i have a table with the columns below as
Emp_ID Address_ID Address_Line City Country
-------- --------- ----------- ------ ---------

Q: Display the Emp_ID's those having more than one
Address_ID

Answers were Sorted based on User's Feedback



i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / gyana ranjan behera

simply write the sql query like

sql>select Emp_ID from table_name groupe by Address_ID
having count(Address_ID )>1;
this is working as per the requirement..i tested
that..thanx ..pls send responces and questions on my mail
id to discuss new situations.

Is This Answer Correct ?    14 Yes 3 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / shashi

select Emp_ID from table_name groupe by Emp_ID
having count(Address_ID )>1;

Is This Answer Correct ?    3 Yes 0 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / ajit

Try with this its working
SELECT name,addres FROM ADDR WHERE name IN
(SELECT name FROM ADDR
GROUP BY name
HAVING COUNT(ADDRES) >1)

Is This Answer Correct ?    1 Yes 0 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / nithya

select Emp_ID from table_name group by Address_ID
having count(Address_ID )>1;

Is This Answer Correct ?    0 Yes 0 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / vijayakumar

we need some sample data's ... then only we can able to write exact query....becoz here emp_id and address_id both are unique.. same data will not repeated....

Is This Answer Correct ?    0 Yes 0 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / abc

select emp_id from table_name a where a.rowid < (select MAX
(rowid) from test b where b.address_id=a.address_id)

Is This Answer Correct ?    0 Yes 1 No

i have a table with the columns below as Emp_ID Address_ID Address_Line City Country ..

Answer / nitin

SELECT EMP_ID FROM EMP_ADDRESS WHERE ADDRESS_ID IN
(SELECT ADDRESS_ID FROM EMP_ADDRESS
GROUP BY ADDRESS_ID
HAVING COUNT(ADDRESS_ID) >1)

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More Oracle General Interview Questions

Explain the difference between a procedure and a function?

0 Answers  


how to insert the image in table

2 Answers  


What are the different approaches used by Optimizer in choosing an execution plan ?

2 Answers  


What is the difference between I and G in Oracle?

0 Answers   MCN Solutions,


Do you know about aggregate functions? What is row num function? Can it be used all databases?

1 Answers   Bravura Solutions, Cap Gemini,






Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?

0 Answers  


Is oracle a programming language?

0 Answers  


What is a shared pool?

1 Answers  


If any one has information regarding interview of NIC (National Informatics Centre),it would be of great help...

0 Answers   NIC,


What is an oracle data file?

0 Answers  


What is the effect of setting the value "ALL_ROWS" for OPTIMIZER_GOAL parameter of the ALTER SESSION command ?

1 Answers  


How to select oracle sequence from different schema and How to select oracle sequence from different Databases. Explain with example

1 Answers   Polaris,


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)