select top 10 * from Information_schema.columns : 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. 1. select top 10 * from Information_schema.columns
4select top 10 from Information_schema.columns
5> GO
TABLE_CATALOG                                                                                                                    TABLE_SCHEMA
                                                          TABLE_NAME                                                                                                                       COLUMN_NAME
                                                                                                                    ORDINAL_POSITION COLUMN_DEFAULT



















                                                                                                                                      IS_NULLABLE DATA_TYPE
                                                                           CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_PRECISION_RADIX NUMERIC_SCALE DATETIME_PRECISION CH
ARACTER_SET_CATALOG                                                                                                            CHARACTER_SET_SCHEMA
                                                        CHARACTER_SET_NAME                                                                                                               COLLATION_CATAL
OG                                                                                                                COLLATION_SCHEMA
                                           COLLATION_NAME                                                                                                                   DOMAIN_CATALOG
                                                                                                     DOMAIN_SCHEMA
                              DOMAIN_NAME
-------------------------------------------------------------------------------------------------------------------------------- -----------------------------------------------------------------------
--------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- -------------
------------------------------------------------------------------------------------------------------------------- ---------------- -------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------------------------- ----------- ------------------------------------------------------
-------------------------------------------------------------------------- ------------------------ ---------------------- ----------------- ----------------------- ------------- ------------------ --
------------------------------------------------------------------------------------------------------------------------------ -------------------------------------------------------------------------
------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ---------------
----------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------
------------------------------------------ -------------------------------------------------------------------------------------------------------------------------------- ----------------------------
---------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------
----------------------------- --------------------------------------------------------------------------------------------------------------------------------
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  xserver_name
                                                                                                                                   NULL



















                                                                                                                                      NO          varchar
                                                                                                 30                     30              NULL                    NULL          NULL               NULL NU
LL                                                                                                                             NULL
                                                        iso_1                                                                                                                            NULL
                                                                                                                  NULL
                                           SQL_Latin1_General_CP1_CI_AS                                                                                                     NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  xdttm_ins
                                                                                                                                   NULL



















                                                                                                                                      NO          datetime
                                                                                               NULL                   NULL              NULL                    NULL          NULL                  NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  xdttm_last_in
s_upd                                                                                                                              NULL



















                                                                                                                                      NO          datetime
                                                                                               NULL                   NULL              NULL                    NULL          NULL                  NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  xfallback_dbi
d                                                                                                                                  NULL



















                                                                                                                                      YES         smallint
                                                                                               NULL                   NULL                 5                      10             0               NULL NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  name
                                                                                                                                   NULL



















                                                                                                                                      NO          varchar
                                                                                                 30                     30              NULL                    NULL          NULL               NULL NU
LL                                                                                                                             NULL
                                                        iso_1                                                                                                                            NULL
                                                                                                                  NULL
                                           SQL_Latin1_General_CP1_CI_AS                                                                                                     NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  dbid
                                                                                                                                   NULL



















                                                                                                                                      NO          smallint
                                                                                               NULL                   NULL                 5                      10             0               NULL NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  status
                                                                                                                                   NULL



















                                                                                                                                      NO          smallint
                                                                                               NULL                   NULL                 5                      10             0               NULL NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_db                                                                                                                  version
                                                                                                                                   NULL



















                                                                                                                                      NO          smallint
                                                                                               NULL                   NULL                 5                      10             0               NULL NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_dev                                                                                                                 xserver_name
                                                                                                                                   NULL



















                                                                                                                                      NO          varchar
                                                                                                 30                     30              NULL                    NULL          NULL               NULL NU
LL                                                                                                                             NULL
                                                        iso_1                                                                                                                            NULL
                                                                                                                  NULL
                                           SQL_Latin1_General_CP1_CI_AS                                                                                                     NULL
                                                                                                     NULL
                              NULL
master                                                                                                                           dbo
                                                          spt_fallback_dev                                                                                                                 xdttm_ins
                                                                                                                                   NULL



















                                                                                                                                      NO          datetime
                                                                                               NULL                   NULL              NULL                    NULL          NULL                  NU
LL                                                                                                                             NULL
                                                        NULL                                                                                                                             NULL
                                                                                                                  NULL
                                           NULL                                                                                                                             NULL
                                                                                                     NULL
                              NULL

(10 rows affected)
1>
2>
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.