How to Find List of Tables Name and Columns or Fields Name of Specific Table in SQL Server

To Find the name of the tables name need to write this script:


SELECT name
FROM dbo.sysobjects
WHERE xtype = 'U'

To Select Names of the Fields or Columns of Specific Table by Name(SQL Script):

SELECT [name] AS [Column name]
FROM syscolumns
WHERE id = (SELECT id
FROM sysobjects
WHERE type = 'U'
AND [NAME] = 'Table_Name')

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন