How to delete duplicate rows from table except one?
No Answer is Posted For this Question
Be the First to Post Answer
i have table students with fields classname,studname select * from students classname studname 1 xxxxx 1 yyyy 1 zzzz 2 qqqq 2 tttt 3 dsds 3 www i want the output should be No of students in class 1 : 3 No of students in class 2 : 2 No of students in class 3 : 2
how many joins we can write if at all we have n no of tables
5 Answers Tanla Solutions, TS,
How we can compare two database data?
in the physical file layout, where should the transaction log be stored in relation to the data file?
Write a query to delete duplicate records in SQL SERVER
Does transparent data encryption provide encryption when transmitting data across the network?
What are the different types of subquery?
What is openrowset sql server?
How to create an inline table-valued function?
What is the diffrence between update_one and auto_fix?
What is the purpose of using COLLATE in a query?
CREATE TABLE [dbo].[HPMS_CompetencyTypes](CompetencyType varchar(50) ) go create trigger hpms_create_Insert on HPMS_CompetencyTypes for insert as if Exists ( select * from [HPMS_CompetencyTypes] where CompetencyType=(select * from [HPMS_CompetencyTypes])) begin Rollback tran Raiserror ('duplicate value',12,6) go insert HPMS_CompetencyTypes (CompetencyType) values ('new') I'm new to trigger can any one tell me where is the issue. Please.
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)