Technical Article

How to get ColumnNames, datatypes and length

This is a followup to the script submitted by srallapalli. One can return a record set of all tables in a database using the following:USE MyDatabaseSELECT so.name AS TableName, sc.name AS ColumnName,  st.name AS ColumnDatatype,  convert(int, sc.length) AS ColumnLength FROM syscolumns sc, sysobjects so , systypes st WHERE so.type='U' AND OBJECTPROPERTY(so.id,'ismsshipped') = 0 AND sc.id=so.id […]

2003-05-10

138 reads

Blogs

Scary Scalar Functions - Part Two: Performance

By

Scary Scalar Functions series overview Part One: Parallelism Part Two: Performance Foreword In the second part of this...

Goal Progress for June 2022

By

I set goals at the beginning of the year, and I’m tracking my progress...

Using Sessionize for Your User Group – Part 2

By

Now that your CFS has been setup it’s time to get the word out...

Read the latest Blogs

Forums

The July Fourth Anniversary

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The July Fourth Anniversary

Independence Day 2022

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Independence Day 2022

Employee Hierarchy Recursive CTE Different Top Level Directors Overtime

By SQL_Kills

Hi, I have looked at some examples of Employee > Manager Hierarchy using Recursive...

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers