Springboard Pillow
Paddling in the murky bits of the byte stream
Thursday, March 04, 2010
T-SQL InformationSchema.Columns
A handy bit of T-SQL was passed to me today (by
@jaminadey
) which returns all the fields in a given table which are non-null...
SELECT * FROM INFORMATION_SCHEMA.Columns where TABLE_NAME = '
' and is_nullable = 'NO'
Of course, you'll see there are lots of other fields which can be inspected, so play around and introspect that DB!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment