Links

SQL Server: Show Tables, Describe

Create proc Describe @tableName varchar(30) as begin set nocount on select column_name, data_type + ' ' + (case data_type when 'char' then '(' + convert (varchar(6),character_maximum_length) + ')' when 'varchar' then '(' + convert (varchar(6),character_maximum_length) + ')' when 'nchar' then '(' + convert (varchar(6),character_maximum_length) + ')' when 'nvarchar' then '(' + convert (varchar(6),character_maximum_length) + ')' else ' ' end) as data_type, (case is_nullable when 'No' then 'NOT NULL' else 'NULL' END) AS NULLABLE FROM information_schema.columns WHERE table_name = @tableName Order by Ordinal_Position asc set nocount off end go

Base Tables

select * FROM information_schema.tables select * FROM information_schema.columns
# 2005/05/06 Read More Source: www.sswug.org

Featured Items

Multi-Resolution Blog Template

Multi-Resolution Blog Template

Better metric: Gallons per 10K Miles

Cadillac Escalade

Optimistic Assets: The Banking Crisis

Photo: Ice Berg

Embedded Video goes Viral

Video: Simpsons' Forclosure

Top of the Dropdown

Screenshot: Dropdown List Box

Credit Crisis: Cash Advances

Photo: Credit Cards

The 1 Percent Doctrine

Image: Blaise Pascal

Supply-Sided Environmentalism

Graph: Energy Savings

Is Oil A National Security Issue?

James Baker: Interview on Charlie Rose

Bike Light Review: Dinotte 600L

Dinotte 600L Bike Light

This Headline Suggested by Google

Pear Lake, Sequoia National Park, California

Quoting Google Video

Alberto Gonzalez: Interview on Charlie Rose

Google China: A very different image

Photo: Tiananmen Sqaure

Subscribe