Thursday, August 16, 2007

USE Database
SELECT ColumnName
FROM Table
Group BY ColumnName
Having count(*) > 1

Monday, August 6, 2007

Copy a table from one database to another

There are many ways to copy a database table to an another database. Below you will find the simplest solution I found for myself.

SELECT *
INTO TargetDatabase.dbo.MyTable
FROM SourceDatabase.dbo.MyTable

del.icio.us Tags: ,,