/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
--list all tables and fields in a database SELECT sysobjects.name AS TableName, syscolumns.name AS FieldName, syscolumns.colorder AS FldOrder FROM sysobjects INNER JOIN syscolumns ON syscolumns.id = sysobjects.id WHERE sysobjects.type = 'U' ORDER BY sysobjects.name, syscolumns.colorder