Queries all the table names and field names in the database.

Source: Internet
Author: User
Queries all the table names and field names in the database.

SQLView All table names:
1. Select name from sysobjects
Where type = 'U'

2. Select * From information_schema.tables

Query the names of all fields in the table:
Select name from syscolumns where
Id = object_id ('table name ')

Select * From information_schema.tables
Select * from
Information_schema.views
Select * From information_schema.columns

OracleView All table names: Select table_name from
User_tables

 

AccessView All table names:
Select name from msysobjects
Where type = 1 and
Flags = 0
Msysobjects is a system object, which is hidden by default. You can use tools, options, views, displays, and system objects to display them.

Oracle Data Type

 

Field Type Description Restrictions Other Instructions
Char Fixed-length string Maximum length 2000
Bytes
 
Varchar2 Variable-length string Maximum length 4000
Bytes
Maximum index length: 749
Nchar Character Set-based fixed-length string Maximum length 2000
Bytes
 
Nvarchar2 Variable-length String Based on Character Set Maximum length 4000
Bytes
 
Date Date (day-month-year) DD-MM-YY (HH-MI-SS) After strict tests, no problems with insects
Long Super long string Maximum length2G (231-1) Sufficient storage for big part head books
Raw Fixed-length binary data Maximum length 2000
Bytes
Multimedia Image sound storage
Long
Raw
Variable-length binary data Maximum length2G Same as above
Blob Binary data Maximum length4G  
Clob Character data Maximum length4G  
Nclob Character data based on character sets Maximum length4G  
Bfile Binary data stored outside the database Maximum length4G  
Rowid Unique row number recorded in the data table 10 bytes ********. *****. ***** format, * 0 or 1
Nrowid The unique row number recorded in the binary data table. Maximum length: 4000 bytes
Number (P, S) Numeric type P is the integer, and s is the decimal place.
Decimal (P, S) Numeric type P is the integer, and s is the decimal place.
Integer Integer type Small integer
Float Floating Point Type Number (38), Double Precision
Real Real Number Type Number (63), higher accuracy

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.