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 […]

You rated this post out of 5. Change rating

2003-05-10

141 reads

Blogs

Mastering the ORDER BY Clause in SQL Window Functions

By

This article provides a comprehensive overview of the ORDER BY clause within SQL window...

SQL Data Pipelines: The Ultimate Guide to Streamlining Your Data Flow

By

Want to build a data analytics foundation that transforms raw data into valuable business...

Using SQL Compare in Read-Only Databases

By

Recently a customer asked if SQL Compare and SQL Data Compare can be used...

Read the latest Blogs

Forums

Logging from application to SQL server 2014..Using ODBC driver 18 for SQL SERVER

By SQL_Surfer

I'm using the below connection string using providing UserID and password on their respective...

Knowing Your Total Reward

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Knowing Your Total Reward

No Renames

By Steve Jones - SSC Editor

Comments posted to this topic are about the item No Renames

Visit the forum

Question of the Day

No Renames

Which of these can't be renamed with sp_rename?

See possible answers