Hi all,
Can any one give answer for this question.
Suppose im having employee table with fields, eno, ename,
dept, address1, address2, address3.
In address field employee can fill only address1 or address2
or address3... at a time he can fill three address fields.
now i want all employee names who filled only one address
field.. Plz its urjent can any one give querry.. Thanks in
advance.

Answer Posted / babuli

select ename from emp where (address1 is not null or address2
is not null or address3 is not null) and
((address1 is null and address2 is null ) or (address1 is
null and address3 is null ) or (address2 is null and address3
is null ))

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write date and time interval literals in oracle?

563


What are the predefined tablespaces in a database?

549


What do database buffers contain?

557


What is a table index in oracle?

618


How to recover a dropped table in oracle?

599






Give the constructs of a package, function or a procedure.

527


What is a nvl function?

555


Explain temporal data types in oracle

593


What is the best way to do multi-row insert in oracle?

552


Explain integrity constraint?

636


Explain an exception and its types?

600


How to update values in a table in oracle?

564


What are transaction isolation levels supported by oracle?

568


Is it possible to center an object horizontally in a repeating frame that has a variable horizontal size ?

1868


what happened to the global index when I truncate the data in one of the partition?

1511