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

jhunu gravatar image

jhunu
90 29 30 31

(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

Usman Butt gravatar image

Usman Butt
13.9k 6 8 14

(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.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

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:

x155

asked: Nov 20, 2011 at 11:28 PM

Seen: 556 times

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