Basic Sql,select Statements

Source: Internet
Author: User

SQL language is not case sensitive.

SQL can be written on one line or multiple lines of keywords cannot be abbreviated or branch clauses are usually written in a branch.

Use indentation to improve the readability of the statement.

SELECT statement

For example table: Scott.emp

SELECT * from SCOTT. EMP where comm > sal;

* Represents a wildcard character. Represents all Columns

Select Sal,comm from scott.emp where ename = ' WARD ';

Note: ename is a string so note its capitalization.

SELECT * from scott.emp where ename like ' s% ';

Select *from scott.emp where Deptno in (10,20);

Select *from scott.emp where comm is not null;

Select sal+10000, ename, job,empno from Scott.emp;

SELECT * FROM [select * from Scott.emp where empno>7600] where deptno in (20,30);

Basic Sql,select Statements

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.