if 3 duplicate records in a table,i want to delete 2 duplicate
records by keeping 1 duplicate and 1 original as it is,how?
Answer Posted / arun ashok
STEP 1 : Insert distinct value in the one new table.
STEP 2 : Delete the values from existing table.
STEP 3 : Again insert the values from new table to existing
table.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
How are the unique and primary key constraints different?
How do I repair damaged sql server mdf file database? In previous day my mdf file has got damage due to unknown reasons then I used dbcc chekcdb command but it failed, MDF file is important for me, I don’ know that how to get back mdf file data. Please anyone suggest me?
What is the purpose of object explorer and its features? : sql server management studio
Mention the different types of replication in sql server.
Is it possible to update the views? If yes, how, if not, why?
What is dimension table? : sql server analysis services, ssas
This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?
What is a select query statement in ms sql server?
Explain what is the difference between union and union all?
How connect excel to sql server?
Can you pass expressions to stored procedure parameters?
Explain about the command-line tool SQLCMD?
What are some examples of schemas?
What will happen if a column containing char type data is changed to the nchar data type?
What is difference between after and before?