This query return columns of table in SQL Server
database
database
DECLARE @TABLE_NAME VARCHAR(MAX)
SET @TABLE_NAME='customer_master'
SELECT c.name
FROM sys.tables AS t, sys.columns AS c
WHERE t.object_id= c.object_id
AND t.name= @TABLE_NAME
No comments:
Post a Comment