x

I want to know the column called as BSEID exist in which all table and in which schema . please help us

I want to know the column called as BSEID exist in which all table and in which schema . please help us

more ▼

asked Nov 20, 2011 at 11:28 PM in Default

avatar image

jhunu
110 29 30 36

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

Hope this will help

 SELECT c.[name] AS ColumnName, SCHEMA_NAME([schema_id]) AS SchemaName, OBJECT_NAME([o].[object_id]) AS TableName
 FROM sys.[columns] AS C
 INNER JOIN sys.[objects] AS O ON [C].[object_id] = [O].[object_id]
 WHERE ([type] = 'U' 
       --OR [type] = 'S' --UNCOMMENT IF WANTED TO SEE SYSTEM TABLES AS WELL
       )
       AND c.[name] = 'BSEID'
more ▼

answered Nov 20, 2011 at 11:45 PM

avatar image

Usman Butt
13.9k 6 13 21

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x335

asked: Nov 20, 2011 at 11:28 PM

Seen: 730 times

Last Updated: Nov 20, 2011 at 11:28 PM

Copyright 2016 Redgate Software. Privacy Policy