delete from table1 where EmpID in(select cId from table1 group by cid having count(*) >1)
Here Reader, We are provide all question yhose asked in interview. you are read this blog and prepare for asp.net interview.
get only unique row and delete all duplicate row
delete duplicate value in sql server
DELETE
FROM MyTable
WHERE ID NOT IN
(
SELECT MAX(ID)
FROM MyTable
GROUP BY column1,
column
)
Rename database in sql 2008
Rename Database in sql server 2008
1. How to create database in sql server 2008
USE Master;
Go
CREATE DATABASE
SALARYMANAGEM;
Go
2. How
to rename database
ALTER DATABSE
SALARYMANAGEM
MODIFY NAME=SALAYMANAGEMANT;
MODIFY NAME=SALAYMANAGEMANT;
Go
3. How
to drop database
Drop Database SALAYMANAGEMANT;
Go
Deepak Goyal
Subscribe to:
Posts (Atom)