troubleshooting Question

include schema in the follow query

Avatar of N_Sri
N_Sri asked on
Microsoft SQL Server 2008
5 Comments3 Solutions388 ViewsLast Modified:
I want include schema field in the below query.

like my tables are in  Abc schema, and bbc schema

i.e Table ,Schema name .....

SELECT  o.name AS TableName,c.name AS Columnname, c.xtype, T.name,o.type
 FROM syscolumns AS c INNER JOIN
 sysobjects AS o ON c.id = o.id INNER JOIN
 systypes AS T ON c.x[code]type = T.xtype
 WHERE T.name ='smallint' and o.type='U'  
 ORDER BY o.name 

Open in new window

ASKER CERTIFIED SOLUTION
grtGUY_007

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 3 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros