Skip to main content

SQL 2005

SQL Script to find duplicate records?

 

Here are some scripts to help to you find Duplicate records or records that occur more than once.

SQL Script to find rows which occur more than once.

This SQL should also work with Visual FoxPro

What is the difference between drop table and delete table in SQL Server

Difference between drop table and delete table in SQL Server

You will notice that there are two ways to get rid of data you don’t require in SQL Server. One is by the Delete Table command and the other one is by the Drop table command. So what is the difference between the two?

How to Find Duplicate Rows in a Table in SQL Server?

Duplicate Rows in a table can be very irritating and cause for many headaches. So how can you identify duplicate rows in a table?  SQL Server provides no visual tool or a built in function to show you the duplicate rows in a table, so you need to write your own query to get the duplicate rows.

How to get the Row Count of each table in a Database in SQL Server?

If you are working with SQL Server and looking for a way to get the row count of all tables in your database, you can do that using this SQL Query.

This Query will display a list of all Tables in your database and a count of the number of Rows the table has.

How to Track all the Applications and Clients connected to the Database in SQL Server?

If you need to trace all the connections from Applications and other Clients to your SQL Database you can do so with the following queries.

How to list all the columns in a database of a specific data type?

Working with SQL Server can be quite interesting. It’s a quite powerful tool and you can really be creative with what you can do with those SQL Queries.

System.ArgumentException: The SqlParameter is already contained by another SqlParameterCollection

 

Error:

System.ArgumentException: The SqlParameter is already contained by another SqlParameterCollection

 

Error SQL01268: Cannot insert duplicate key in object 'dbo.ComponentTypeRef'

Error:

Error SQL01268: .Net SqlClient Data Provider: Msg 2627, Level 14, State 1, Line 3 Violation of PRIMARY KEY constraint 'PK_ComponentTypeLu'. Cannot insert duplicate key in object 'dbo.ComponentTypeRef'.

How to configure the Database Project to Update the Target Database when you build and deploy the Project?

Step 1:

                Right-Click on the Project in the Solution Explorer and select Properties.

Step 2:

Syndicate content