clear markdown feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3364508 fiddles created (36223 in the last week).

CREATE TABLE Food1( [Group] [nvarchar](100) NULL, [Quantity] [int] NOT NULL, [Color] [nvarchar](50) NULL, ) ON [PRIMARY];
 hidden batch(es)


CREATE TABLE Food2( [Code] [nvarchar](50) NOT NULL, [Quantity] [int] NOT NULL, [Color] [nvarchar](50) NULL, ) ON [PRIMARY];
 hidden batch(es)


CREATE TABLE Food3( [Code] [nvarchar](50) NOT NULL, [Group] [nvarchar](100) NULL, [Quantity] [int] NOT NULL, ) ON [PRIMARY];
 hidden batch(es)


SELECT A.name AS 'ColumnName',B.name AS 'TableName',B.object_id AS 'ID' FROM sys.columns A INNER JOIN sys.tables B ON A.object_id = B.object_id WHERE A.name LIKE '%Code%' ORDER BY TableName,ColumnName;
ColumnName TableName ID
Code Food2 597577167
Code Food3 613577224
 hidden batch(es)