Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

sp_tables Expand / Collapse
Author
Message
Posted Tuesday, November 30, 2010 10:04 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:39 AM
Points: 13,570, Visits: 11,380
Nice question, thanks.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1028090
Posted Tuesday, November 30, 2010 10:12 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:01 AM
Points: 1,228, Visits: 1,046
Nice Question!
I liked the way I learned something from the answer.
Never tought before about how it lists System Tables as a TABLE object even though they are differant from user created TABLE objects.
Post #1028096
Posted Tuesday, November 30, 2010 11:00 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Friday, March 11, 2011 11:22 PM
Points: 19, Visits: 36
I too answered incorrectly after reading the documentation of msdn. The statment "any object that can appear in a FROM clause, except synonym objects", made me assume that user defined functions too would be included.
Post #1028135
Posted Tuesday, November 30, 2010 11:44 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, March 25, 2013 4:03 AM
Points: 850, Visits: 71
Good question. Keep it up.

Regards,
Jagan.
Post #1028431
Posted Wednesday, December 1, 2010 12:37 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 6:39 AM
Points: 13,570, Visits: 11,380
payalvyas11 (11/30/2010)
I too answered incorrectly after reading the documentation of msdn. The statment "any object that can appear in a FROM clause, except synonym objects", made me assume that user defined functions too would be included.


True, the documentation can be confusing, but if you've read further, you would have noticed by result sets: TABLE_TYPE --> table, system table or view.

This leaves very little doubt of course.




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1028442
Posted Wednesday, December 1, 2010 5:42 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 4:51 AM
Points: 7,874, Visits: 9,612
Nice straightforward question, no tricks or traps. Pity that the MS documentation has fallen out of date, though.

Tom
Post #1028549
Posted Thursday, December 2, 2010 8:33 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, April 30, 2012 12:36 PM
Points: 404, Visits: 442
When I do a 'select * from sys.tables' on a database with views, only the tables are returned, not the views. This is on SQL 2005. What am I doing wrong? Can someone verify this?
Post #1029303
Posted Thursday, December 2, 2010 12:20 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Yesterday @ 5:21 AM
Points: 6,098, Visits: 8,367
You're doing nothing wrong. This is the expected and documented behaviour for sys.tables.

Note that this discussion is about the system stored procedure sp_tables, not about the catalog view sys.tables.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #1029463
Posted Thursday, December 2, 2010 12:26 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, April 30, 2012 12:36 PM
Points: 404, Visits: 442
Thanks Hugo. I have forgotten how to read.
Post #1029466
Posted Friday, December 3, 2010 1:41 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 5, 2014 2:00 PM
Points: 2,160, Visits: 2,191
Nice question, thanks!
Post #1030145
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse