Sqlplus Study Notes (2)

Source: Internet
Author: User

Sqlplus learning notes (2) set the length of the line to 200 characters and then line feed [SQL] set linesize 200 note: Sqlplus command does not need to write ";" Semicolon SQL statement must end with a semicolon, the Sqlplus command can be used as a plus sign. Set the Column width if you want to set the column character setting Column name width 6 characters (a6 represents 6 characters) [SQL] column name format a6 note: this Sqlplus command cannot set the numeric format (such as id). Character and number are treated differently in Oracle. The attribute column shows four numbers, and the format is defined as 4 9. [SQL] column id format 9999 col id for 9999 // abbreviation Note: column can be abbreviated as col; format can be abbreviated as. View table structure [SQL] desc tablename // desc table name Note: The SET command is only valid in the current window, and the window reconnection is still displayed by default. "/" Indicates executing the previous SQL statement and ignoring the SQL command. Set [SQL] set pagesize 100 // display set pages 0 for each 100 rows of data. // pagesize can be abbreviated as pages, if the value 0 is set, the [SQL] select * from tablename; // "*" asterisk indicates that the select name and email from tablename of all columns are queried; // query the data conditions of a specified column. query the names of all registrants with id = 1001 and passwd = 1234. <1> query the names and email [SQL] select name and email from tablename; // query the data of a specified column <2> Search for the name of the candidate with id = 1001 and passwd = 1234 [SQL] select name, email from tablename where id = 1001 and passwd = '000000 ';

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.