SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestTable' : Information_schema « System Settings « SQL Server / T-SQL Tutorial

SQL Server / T-SQL Tutorial
1. Query
2. Insert Delete Update
3. Table
4. Table Join
5. Data Types
6. Set Operations
7. Constraints
8. Subquery
9. Aggregate Functions
10. Date Functions
11. Math Functions
12. String Functions
13. Data Convert Functions
14. Analytical Functions
15. Sequence Indentity
16. View
17. Index
18. Cursor
19. Database
20. Transact SQL
21. Procedure Function
22. Trigger
23. Transaction
24. XML
25. System Functions
26. System Settings
27. System Tables Views
28. User Role
29. CLR
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
SQL Server / T-SQL Tutorial » System Settings » Information_schema 
26. 14. 6. SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestTable'
5CREATE DATABASE Test
6> GO
1CREATE TABLE TestTable(
2>    col1   int,
3>    col2   int
4)
5> GO
1SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestTable'
2> GO
TABLE_CATALOG
--------------------------------------------------------------------------------------------------------------------------------
master

(rows affected)
1>
2> drop table TestTable;
3> GO
1>
2> drop database Test;
3> GO
26. 14. Information_schema
26. 14. 1. select top 10 * from Information_schema.columns
26. 14. 2. Information_schema.views
26. 14. 3. Information_schema.tables
26. 14. 4. System views INFORMATION_SCHEMA
26. 14. 5. obtain metadata about database objects.
26. 14. 6. SELECT TABLE_CATALOG FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'TestTable'
26. 14. 7. Match a table name in tempdb.INFORMATION_SCHEMA.TABLES
26. 14. 8. Query tempdb.INFORMATION_SCHEMA.TABLES
26. 14. 9. A script that creates a summary of the tables in a database
26. 14. 10. Check the view existance
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.