skip to the main content area of this page
Search Script Archive 

Transact SQL scripts written by
DBAs and Developers for
DBAs and Developers.
If you would like to submit a script to our site click here

Enter Search Value:     

Generate Insert Statement
Submitted By: Top Lady DBA
Submitted On: 2/6/2007
Description: This script will produce a script that creates an insert statement with optional identity insert read more...

Get Date Only
Submitted By: 2008DBA
Submitted On: 5/4/2007
Description: This is a simple query that will return only the data from a column with a datetime datatype. To use replace getdate() with your datetime column. read more...

Find Primary Keys
Submitted By: onereg
Submitted On: 5/7/2007
Description: This script returns two columns, the first is the table name and the second will display TRUE if the table has a primary key, FALSE if it does not and NOT APPLICABLE is it not a table read more...

Table Size Estimator
Submitted By: Chris
Submitted On: 5/8/2007
Description: A script that can help to estimate the size in bytes of a table when all you know are the table names and estimated row counts. Based on http://msdn2.microsoft.com/en-us/library/aa933068(SQL.80).aspx. This script does not consider the space taken by indices on the tables. read more...

What SQL Queries Are Currently Running?
Submitted By: jond
Submitted On: 5/11/2007
Description: Taken from: http://blogs.msdn.com/irenak/archive/2007/04/27/sysk-338-what-sql-queries-are-currently-running.aspx This is cool script - wish I had written it! read more...

 

Number Of Rows