T-SQL

Optimize Character Field Usage

  • Script

This stored procedure was designed to scan all your character based columns in a particular database and show the minimum, maximum and average data length. As well as give an efficiency rating of the data stored. Input: None Output: Table name, Column name, Defined datatype and length, Average length of data for that column, Minimum […]

2001-08-10

1,659 reads

Generate Insert Statements Easily

  • Script

This script will generate insert statements for the given tables. You can pass the tables names, separated by commas, into sp_DataAsInsCommand stored procedure as in the example below: EXEC sp_DataAsInsCommand 'employee,titleauthor,pub_info' Updated on 5/25/01 to correct an issue with columns that are short like a column defined as char(1), to correct another issue with the […]

3 (9)

2001-08-09

4,598 reads

ANSI Joins

  • Article

Are you confused by all this inner join style syntax that is becoming more and more prominent lately? This article by Neil Boyle will help you find your footing in the ANSI join syntax.

5 (3)

2001-05-29

8,398 reads

Blogs

Using Framing for a Running Total–#SQLNewBlogger

By

Another post for me that is simple and hopefully serves as an example for...

Accessibility in your PowerPoint slide deck

By

This post is part of the series I kicked off here. You can read...

Daily Coping 28 Jul 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Read the latest Blogs

Forums

Error shrinking database

By Ram

While trying to shrink a database using the command "dbcc shrinkdatabase ([db_name])", I get...

Are Powerplans still relevant for VM servers?

By WebTechie

Hello, I am rolling out a new monitoring environment.  While in testing, it is...

SELECT records from table 1 that does not exist in table 2 via UNION

By technoob

Sorry if this seems too beginner; I have been stuck at this for days...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers