Home » SQL & PL/SQL » SQL & PL/SQL » Some interview questions.
Some interview questions. [message #238178] Thu, 17 May 2007 00:25 Go to next message
Messages: 144
Registered: February 2007
Location: india
Senior Member

Dear all,
I have some diffent doubts are mention below . u have answer send me..its urgent..

question 1:

I a table 1000 records are there. First 100 rows are null rows.

how can i select first 100 null rows?. is possible?

create primary key is possible in this table? ( i think not possible)becuse

primary not allow null and duplicates.

question 2:

in dept table deptno is primary key
in emp table(deptno) foreign key from dept table .

i want to reorganise parent table (dept table) what can i do?

question 3:

what is difference between unique index and non unique index?
i mention a column in a table which index is automatically created?

question 4:

what is full table scan?what is the use compare to indexing?

question 5:

In a table one column contain primary key . I want to create index on that column
i choose in which type of index.?(unique or non unique)

Expecting some good replies... pls

Re: Some interview questions. [message #238180 is a reply to message #238178] Thu, 17 May 2007 00:35 Go to previous message
Messages: 7062
Registered: December 2001
Senior Member
akkumar81 wrote on Thu, 17 May 2007 07:25
Dear all,
I have some diffent doubts are mention below . u have answer send me..its urgent..
Urgent? Not for me.

akkumar81 wrote on Thu, 17 May 2007 07:25
question 1:

I a table 1000 records are there. First 100 rows are null rows.
And that just does not make sense. I stopped reading over there. Search for "first" or "last" + "relational" with my handle.

akkumar81 wrote on Thu, 17 May 2007 07:25
question 2: i want to reorganise parent table (dept table) what can i do?
Reorganize? What do you mean?

akkumar81 wrote on Thu, 17 May 2007 07:25
question 3: what is difference between unique index and non unique index?
A unique index is blue. Very Happy.

One last time: read that documentation. Now. It's urgent.


Quote (Chinese proverb) :
"He who asks a question may appear to be a fool, he who does not ask will remain a fool forever"

Before you decide to open a new topic, you should ask yourself:

  1. First of all: Did I try myself? Or am I just hoping that someone else is willing to do my work?
  2. Did I read the documentation? A lot of questions are answered there. Really.
  3. Have I checked the FAQ page?
  4. Did I search the board properly? Have I also tried the Site Search Engine? A large group of the questions posted here are just a déjà -répondu of the past.
  5. Did I use Google? Even if your question hasn't been answered here, chances are that on other websites someone already has posted an answer.
  6. Is my question specific to the Oracle database? Now, that may seem obvious since this site is called Oracle FAQs, but we get quite a few questions about Access here - and SQL between databases is not always compatible - so please ask any non-Oracle questions elsewhere. It will be to your advantage.

Ok, so you didn't find an answer yet. No sweat, you're welcome to post it here and a lot of people are happy to answer. They can, however, only answer if enough info is provided.


So, if you open a new topic consider the following:
  1. Choose a topic that makes sense, perhaps the error message. A good topic title might be "ORA-1555 during pl/sql loop" A less fortunate choice of title might be "URGNT PLZ!!!!!!!!!!!!" Avoid the following keywords: urgent/please/help/now/immediately (and derivatives)
  2. Choose the appropriate forum, if in doubt: don't worry. The moderators can always move it.
  3. If relevant, post the error code(s).
  4. If you want to post error codes or SQL*Plus output, just copy everything that is on your screen when the error occurred, for instance:
    SQL> insert into t2 values (t2_s.nextval, x1) returning id into :x2;
    insert into t2 values (t2_s.nextval, x1) returning id into :x2
    ERROR at line 1:
    ORA-00984: column not allowed here
  5. Post Database and OS version. By doing so, you avoid reactions using features you can't use.
  6. Post any code with the formatting tags:
    [code] Enter your code here.[/code]
    You can also paste the code in your message, select it and hit this button http://www.orafaq.com/forum/theme/orafaq/images/b_code.gif You can also make use of the formatter page of this site. It can be found here: http://www.orafaq.com/utilities/sqlformatter.htm . Just copy your code into the page hit "Format code" and copy the formatted code to your message.
  7. Show us what you did (if you tried it yourself), including errors and/or why the result is not what you want.
  8. Provide DDL (CREATE TABLE, etc.) as appropriate instead of listing the table structure. It'll help people setting up a test set (yes, some people really do that)
  9. Provide INSERT statements for sample data instead of pasting in or mocking up the results of a SELECT statement.
  10. Provide your expected result set.
  11. If you found an answer yourself, post it. That way we know the issue is resolved and we might learn from it.

  • Don't think you have more chance if you PM individual members. Just post your question in public: more people can see/answer them that way. Most PM'ed questions are posted to the forum anyway.
  • Again, forum members are not here to do your work for you nor to do your homework assignment for you. If you are stuck however, we will gladly help you out.
  • Don't use uppercase only. It's harder to read and gives the impression you're shouting.
  • Have the courtesy to write in plain English. A lot of people (me, amongst others Very Happy) are not native English speaking and don't feel encouraged when they have to decipher some gobbledygook. Especially abbreviations like "U", "Ur", "U r", "Plz", "prb", "qry" tend to get on people's nerves. If you don't take time to write in proper English, how can you expect that others would answer properly?
  • Always spell check and proof read your messages before posting them.
  • Don't "wild post", i.e. post a reply that has nothing to do with the original thread.
  • Be patient. A lot of people here are just browsing the board once a day.
  • Don't cross-post. Duplicates will be removed.
  • Commercial posts are admitted only in the Marketplace sub forum and only if it's relevant to the OraFAQ community.
  • If you feel that a message is not admissible for some reason (offending language/opinions - personal attacks - ...), you can report it to the moderator staff. But if you want extra attention for your topic, reporting will act contra productive.

And as a rule of thumb: be polite. No one is paid for answering your question. The least you can do is show some respect to those who are willing to dedicate some of their spare time to look at your problem.

USEFUL SITES (bookmark them!)
The 2 sites above require a free (no spam!) otn account. Subscribe now, it's well worth it.
  • MetaLink: Oracle's official support website. Only accessible for users with a valid support identifier. But the place to be for patches, bugs, ORA-600 info,...
  • AskTom: a tremendous amount of SQL and PL/SQL related questions gathered on an easy website and answered by the master himself.


Try one of these alternatives:

[Updated on: Thu, 17 May 2007 00:37]

Report message to a moderator

Previous Topic: Executing a trigger
Next Topic: order by the value from column
Goto Forum:

Current Time: Mon Aug 21 14:34:18 CDT 2017

Total time taken to generate the page: 0.05595 seconds