Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


write a query to delete similar records in different tables
with same structure

Answers were Sorted based on User's Feedback



write a query to delete similar records in different tables with same structure..

Answer / vinoth kumar

DELETE FROM table1 WHERE
(col1,col2,..) IN (SELECT col1,col2,.. FROM table2 where
condition)

Is This Answer Correct ?    6 Yes 0 No

write a query to delete similar records in different tables with same structure..

Answer / radha sri seshu.kolla

while creating table and giving foreign key constraint give
the key word 'on delete cascade'.automatically when the
record in the master table is delated the relaeted record
in the detail table will also be deleted.

Is This Answer Correct ?    3 Yes 3 No

write a query to delete similar records in different tables with same structure..

Answer / umadevi

example

delete from emp where deptno in (select deptno from dept
where emp.deptno=dept.deptno);

Is This Answer Correct ?    3 Yes 5 No

write a query to delete similar records in different tables with same structure..

Answer / senthil

This done by Co-related sub-query:- based upon ROWID
uniqness this deletes the duplicate rows.

Delete from emp x where ROWID != (Select MIN(ROWID) from
emp y where y.empno = x.empno);

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

How do you update a table in sql?

0 Answers  


wirte a query to remove null? following table are col1 col2 col3 dinesh null null null suresh null null null prakesh i want the output like col1 col2 col3 dinesh suresh prkaesh

6 Answers   TCS,


Types of indexes. What is the default key created when a primary key is created in a table ?

5 Answers   TCS,


What are sql triggers used for?

0 Answers  


what is denormalization. : Sql dba

0 Answers  


what are myisam tables? : Sql dba

0 Answers  


What is TABLE SPACE?

4 Answers   ABB, TCS,


What are inbuilt functions in sql?

0 Answers  


How does an execution block start and end in pl sql?

0 Answers  


Explain the order of sql statement execution?

0 Answers  


What are expressions?

0 Answers  


What is dialect in sql?

0 Answers  


Categories