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...


How to delete same emp id in sql query for exmaple in emp
table emp id, empname, emp address. for example emp id =5,
repeated in two times in rows same id how to delete same
empid please any one of the write query send in my id

Answers were Sorted based on User's Feedback



How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / akshita

delete from emp where rowid not in (select max(rowid) from
emp group by empno)

Is This Answer Correct ?    11 Yes 3 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / mail2sentha

DELETE FROM EMP WHERE ROWID NOT IN(SELECT MIN(ROWID)FROM
EMP GROUP BY EMPID);

Is This Answer Correct ?    6 Yes 0 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / rohit kumar

Delete from employee where (empid,empname) notin (select min
(empid),empname from employee group by enmpname);

Is This Answer Correct ?    2 Yes 1 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / ajit

DELETE FROM EMP WHERE EMPID= 5 AND ROWNUM < 2;

Is This Answer Correct ?    0 Yes 0 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / guest

u can delete by slelcting the rowid of that particular
record

Is This Answer Correct ?    3 Yes 4 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / his highness yadav

ur question is not much clear

is it to delete duplicate rows or

to delete all the rows which is repeating , and the original

fr the first the query above will work fine

second option try this

delete from emp a, emp b where a.empno=b.empno

i think this will go ,, this will delete the all records which
is duplicating


cheers

Is This Answer Correct ?    1 Yes 4 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / prajyot

Hi,

You can use the below mentioned query ....

SELECT ROWID( Emp_id ) FROM EMP WHERE Emp_id = 5;

Praj

Is This Answer Correct ?    1 Yes 5 No

How to delete same emp id in sql query for exmaple in emp table emp id, empname, emp address. for ..

Answer / vijay

Delete from emp where empid=5;

Is This Answer Correct ?    4 Yes 10 No

Post New Answer

More SQL PLSQL Interview Questions

SELECT flavor, SUM (ice_cream_sales) FROM sales_detail GROUP BY flavor ORDER BY 2 DESC If the "sales_detail" table contains ten records with different values in the flavor column (two "vanilla," three "chocolate," four "strawberry," and one NULL), how many rows are returned by the sample code above? 1. 0 rows 2. 1 row 3. 3 rows 4. 4 rows 5. 10 rows

8 Answers   Sonata,


What is query syntax?

0 Answers  


What is flag in sql?

0 Answers  


What program will open a mdb file?

0 Answers  


How many types of relationship are there?

0 Answers  


Can we use ddl statements in stored procedure sql server?

0 Answers  


What is range partitioning?

0 Answers  


what is the difference between granting and creating a view?

2 Answers  


What is the basic difference between a sql and stored procedure ?

2 Answers   L&T,


What is the difference between syntax error and runtime error?

0 Answers  


table - new_no old_no 2345 1234 3456 2345 5678 4567 output sud be -new_no 1234 2345 3456 4567 5678

2 Answers  


Can we use commit inside a trigger?

0 Answers  


Categories