View plain-Query All employees ' information select * from EMP; --Set the line wide set Linesize 120; --Sets the width of the column width to four digits col empno for 9999; --Set column width, A is a string of eight-bit length col ename for A8--set pagesize display 30 records per page set pagesize 30; Arithmetic expressions are supported in--sql, note: If an expression contains a null value, the entire expression is an empty select Empno,ename,sal,sal*12,comm,sal*12+comm from EMP; --Using an empty filter function, if comm is empty, replaces the Select EMPNO,ENAME,SAL,SAL*12,COMM,SAL*12+NVL (comm,0) from EMP with 0; --three ways to use aliases, aliases have the difference between the unique quotes: with double quotes can contain spaces and special characters, without double quotes cannot select Empno as "employee number", ename "name", Sal monthly salary, COMM,SAL*12+NVL (comm,0) Annual income from EMP; For Disctinct, the same record is taken only once select distinct deptno from EMP; -When disctinct with multiple values, it is considered to be the same record select distinct deptno,job from emp when Deptno and job are the same; --Use of connectors
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.