Answers for "select coulmns name from table in sql"

SQL
5

find table from column name in sql

SELECT      c.name  AS 'ColumnName'
            ,t.name AS 'TableName'
FROM        sys.columns c
JOIN        sys.tables  t   ON c.object_id = t.object_id
WHERE       c.name LIKE '%MyName%'
ORDER BY    TableName
            ,ColumnName;
Posted by: Guest on July-20-2020
0

sql query to return field name of a table

select COLUMN_NAME from INFORMATION_SCHEMA.COLUMNS 
where TABLE_NAME = 'tablename'
Posted by: Guest on July-28-2021

Code answers related to "select coulmns name from table in sql"

Code answers related to "SQL"

Browse Popular Code Answers by Language