Sqlplus Study Notes (1)

Source: Internet
Author: User

Sqlplus learning notes (1) create a table and insert data [SQL] create table user_emp (id number (4), passwd char (4), name char (20 ), phone char (20), email varchar2 (50); prompt Table Created indicates that the Table has been successfully Created> data type <> number (n) number (n digits at most) number (n, m) floating point number (n digits in total, m digits after the decimal point) for example: number (7, 2) indicates the maximum number of 99999.99 <> string char (n) it indicates that a fixed-length string (easy to query) can be up to n characters long. If the entered data is not n characters long enough, there will be no space. In any case, it will take up to n characters long. Varchar (n) indicates that a variable-length string can be up to n characters. when the data is put into a variable-length string, the length of the variable occupies a large space varchar2 (n) oracle custom variable-length string <> the date inserts user data into the data table [SQL] insert into user_emp values (1001, '20140901', 'libuse', '20160301 ', 'lius @ 163.com '); the characters in the database are enclosed in single quotes, and numbers are not required. Data Query [SQL] select * from user_emp; three SQL statements summary <1> create a table name (column name type ,...) <2> insert data into table name values (column value ,...) <3> query the select * from table name;

Related Article

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.