if 3 duplicate records in a table,i want to delete 2 duplicate
records by keeping 1 as it is,how?
Answer / venkat
if u r table like this
sno sname fee
1 a 1000
1 a 1000
2 b 1000
2 b 1000
3 c 1000
3 c 1000
--- write this
with duplicatecte
as
(select row_number()over(partition by sno,sname order by fee
)as rnum from students )
delete from dupcte where rnum>1
---run this query
select * from students
--out put is
1 a 1000
2 b 1000
3 c 1000
this is correct
Is This Answer Correct ? | 2 Yes | 0 No |
what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
How to test a dml trigger in ms sql server?
in the physical file layout, where should the transaction log be stored in relation to the data file?
what is the difference between count(*) and count(1) ?
Define union, union all, minus, intersect?
1. Tell me your daily activities 2. If sql server installation fails at time installation what will do 3. Where does the sql server installation log details are stored 4. After the installation what will you do for memory configuration 5. What is the difference between SQL max maximum memory and AWE memory 6. How will you configure AWE memory 7. How will setup an email alert for the backup job 8. After the SQL installation what are the jobs will you configure 9. What does –g mean in the sql startup parameter 10. What is the difference between Bulked log and Full recovery model 11. What is the difference between mirroring and log shipping 12. What are the steps to be followed before in-place up gradation 13. After installing the patch the sql server does not start and application team tells to rollback the changes .In this scenario what will you do
how do u do Performance tunning ?
1 Answers Infodat Technologies, Satyam,
Why use “in” clause in sql server?
What are temporal tables in sql server 2016?
What are the extra roles available in msdb? : sql server security
What is the difference between dataadapter and datareader?
Can we drop user if user mapped to any logins