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


one of the column in my table contains the data like
SAL
----
1000
1000
2000
3000
3000

So my requirement is i want output like
SAL
---
1000
2000
3000

it mean i want to delete duplicate rows in the table
permanently and i want output in the above formatow should u
write query?

Answers were Sorted based on User's Feedback



one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So ..

Answer / dinesh kumar

delete from table_name alias1
where rownum < ( select max(rownum) from table_name alias2
where alias1.col1 = alias.col2 );

Is This Answer Correct ?    0 Yes 0 No

one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So ..

Answer / destiny

create table salary2 as select distinct * from salary1
drop table salary1
rename salary2 to salary1

Is This Answer Correct ?    0 Yes 0 No

one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So ..

Answer / muthukumar

Select Sal From Emp
Group By Sal

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More SQL PLSQL Interview Questions

How to export the table data (this table having 18 million records) to .csv file. Please tell me is there any faster way to export the data.

8 Answers  


what are the security recommendations while using mysql? : Sql dba

0 Answers  


What is sql trigger example?

0 Answers  


What is the use of index in sql?

0 Answers  


how do you login to mysql using unix shell? : Sql dba

0 Answers  


What is sharding in sql?

0 Answers  


What is pl sql in dbms?

0 Answers  


What is the difference between pl and sql?

0 Answers  


In a Distributed Database System Can we execute two queries simultaneously ? Justify ?

3 Answers  


Which is faster joins or subqueries?

0 Answers  


Is left join faster than join?

0 Answers  


Explain what is a view?

0 Answers  


Categories