Display Table Information

Display Table Information

This script displays all your table names&#151along with their column names, data types, data lengths, and null/not null information in a database.

SELECT Sysobjects.name AS TABLE_NAME, syscolumns.Id, syscolumns.name AS COLUMN_NAME,systypes.name AS DATA_TYPE, syscolumns.length as CHARACTER_MAXIMUM_LENGTH, sysproperties.[value] AS COLUMN_DESCRIPTION,  syscomments.text asCOLUMN_DEFAULT,syscolumns.isnullable as IS_NULLABLE FROM syscolumnsINNER JOIN systypes    ON syscolumns.xtype = systypes.xtype     LEFT JOIN sysobjects ON syscolumns.id = sysobjects.id    LEFT OUTER JOIN sysproperties ON    ( sysproperties.smallid = syscolumns.colid     AND sysproperties.id = syscolumns.id)    LEFT OUTER JOIN syscomments ON syscolumns.cdefault = syscomments.id    WHERE syscolumns.id IN      (SELECT id FROM SYSOBJECTS WHERE xtype = 'U') AND (systypes.name <> 'sysname')    ORDER BY syscolumns.colid
Share the Post:
Heading photo, Metadata.

What is Metadata?

What is metadata? Well, It’s an odd concept to wrap your head around. Metadata is essentially the secondary layer of data that tracks details about the “regular” data. The regular

XDR solutions

The Benefits of Using XDR Solutions

Cybercriminals constantly adapt their strategies, developing newer, more powerful, and intelligent ways to attack your network. Since security professionals must innovate as well, more conventional endpoint detection solutions have evolved

AI is revolutionizing fraud detection

How AI is Revolutionizing Fraud Detection

Artificial intelligence – commonly known as AI – means a form of technology with multiple uses. As a result, it has become extremely valuable to a number of businesses across