Answer Posted / navaneethakrishnan
table name : tblduplicate
Ans : DELETE TOP(1) FROM [tblduplicate] WHERE [ID] = 1
Example :
CREATE TABLE tblduplicate(ID int NOT NULL, Name varchar(50))
insert into tblduplicate values(1, 'Name1')
insert into tblduplicate values(1, 'Name1')
insert into tblduplicate values(2, 'Name2')
insert into tblduplicate values(2, 'Name2')
insert into tblduplicate values(3, 'Name3')
insert into tblduplicate values(3, 'Name3')
select * from tblduplicate
Result :
1 Name1
1 Name1
2 Name2
2 Name2
3 Name3
3 Name3
DELETE TOP(1) FROM [tblduplicate] WHERE [ID] = 1
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
Why use “nolock” in sql server?
What is normalization 1nf 2nf 3nf?
What are the reporting services components?
What is the purpose of object explorer and its features? : sql server management studio
What are the differences between local and global temporary tables?
Would you store your query in a ssrs report or a database server? State the reason why?
How to manipulate data from one table to another table ?
Mention the different types of replication in sql server.
What is the difference between a fill factor of 100 and 0?
What is a with(nolock)?
How will you find out if there are expensive SQL statements running or not?
How do you rename a table in sql server?
You are doing log shipping due to some reasons it is failing. How you will proceed from there
Can you explain different types of locks in sql server?
If you are given access to a SQL Server, how do you find if the SQL Instance is a named instance or a default instance?