Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by VM
»
sp_tables
20 posts, Page 1 of 2
1
2
»»
sp_tables
Rate Topic
Display Mode
Topic Options
Author
Message
VM-723206
VM-723206
Posted Monday, November 29, 2010 9:19 PM
SSChasing Mays
Group: General Forum Members
Last Login: Saturday, April 06, 2013 12:20 AM
Points: 649,
Visits: 263
Comments posted to this topic are about the item
sp_tables
Post #1027714
Hardy21
Hardy21
Posted Monday, November 29, 2010 9:28 PM
SSC Eights!
Group: General Forum Members
Last Login: 2 days ago @ 7:11 AM
Points: 877,
Visits: 1,159
Very straight forward question. Thanks.
Thanks
Post #1027716
SQLRNNR
SQLRNNR
Posted Monday, November 29, 2010 11:03 PM
SSCoach
Group: General Forum Members
Last Login: Today @ 10:25 AM
Points: 18,754,
Visits: 12,337
Thanks for the question.
Jason
AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server 2008
SQL RNNR
Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1027747
Nakul Vachhrajani
Nakul Vachhrajani
Posted Monday, November 29, 2010 11:07 PM
Ten Centuries
Group: General Forum Members
Last Login: Yesterday @ 1:02 AM
Points: 1,277,
Visits: 1,609
Straight-forward, simple, yet important question.
Thanks!
Thanks & Regards,
Nakul Vachhrajani.
http://beyondrelational.com/modules/2/blogs/77/nakuls-blog.aspx
Be courteous. Drive responsibly.
Follow me on
Twitter:
@nakulv_sql
Google Plus:
+Nakul
Post #1027750
sharath.chalamgari
sharath.chalamgari
Posted Tuesday, November 30, 2010 12:11 AM
Ten Centuries
Group: General Forum Members
Last Login: Monday, September 17, 2012 7:30 AM
Points: 1,038,
Visits: 679
simple one today ;)
Post #1027773
Yousaf Khan
Yousaf Khan
Posted Tuesday, November 30, 2010 1:10 AM
SSC-Addicted
Group: General Forum Members
Last Login: Wednesday, September 26, 2012 10:43 PM
Points: 407,
Visits: 73
Check the bellow link for this topic
http://searchsqlserver.techtarget.com/tip/Stored-procedure-List-SQL-Server-database-objects-by-selected-types
Yousaf Khan
Post #1027792
Hugo Kornelis
Hugo Kornelis
Posted Tuesday, November 30, 2010 1:52 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 1:01 PM
Points: 5,244,
Visits: 7,060
An interesting question.
I will not debate the quality of the question, but I will debate the quality of the documentation. Not the documentation that is linked to (this is a very old description, pointing to the SQL Server 2000 version of Books Online), but to the current version (found
here
), that is almost identical.
The description in BOL explicitly mentions the three types that were also the answer to this question: tbales, views, and system tables. But as of SQL Server 2005, system tables no longer exist - or rather, they do exist, but are completely hidden from view. They have been replaced by system views. These are returned by sp_tables - as views, not as system tables. So since SQL Server 2005, sp_tables no longer returns objects of the type SYSTEMTABLE.
The same description in BOL also says that sp_tables, and I quote, "Returns a list of objects that can be queried in the current environment. This means any object that can appear in a FROM clause, except synonym objects". If that were true, then
some
user-defined functions should be included as well, namely all table-valued functions. This is not the case.
My guess is that sp_tables has not been touched since SQL Server 2000. Neither the procedure, nor the documentation has been changed. And noone has noticed that, in spite of the lack of changes, external changes have made the documentation go out of sync.
Thanks for the interesting question, VM - I had never heard of this system stored procedure before. (And I'll probably forget about it within a few days
).
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #1027798
sknox
sknox
Posted Tuesday, November 30, 2010 7:40 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 9:31 AM
Points: 1,041,
Visits: 1,356
Hugo, I do hope that you've posted the same excellent analysis as a comment to the Microsoft documentation...
Post #1027989
adrian.facio
adrian.facio
Posted Tuesday, November 30, 2010 7:45 AM
Old Hand
Group: General Forum Members
Last Login: Monday, January 21, 2013 8:22 AM
Points: 313,
Visits: 312
Oh men, i was thinking about table valued functions and i answer incorrectly, they can be in a "from" clause. I was being very literal, surely msdn did not mean an absolute "everything that can be in a from clause".
Post #1027993
Hugo Kornelis
Hugo Kornelis
Posted Tuesday, November 30, 2010 8:36 AM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 1:01 PM
Points: 5,244,
Visits: 7,060
sknox (11/30/2010)
Hugo, I do hope that you've posted the same excellent analysis as a comment to the Microsoft documentation...
Thanks!
And no, I did not. But I did submit it as feedback to the article, so that it will hopefully be fixed.
Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog:
http://sqlblog.com/blogs/hugo_kornelis
Post #1028018
« Prev Topic
|
Next Topic »
20 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.