|
课程第10次(2016-04-18星期一):WHERE,SORT和单行函数
【上完1Z0-051的第2章】:WHERE, SORT
【1Z0-051】:共3章
【1Z0-052】:共3章
2016-04-18.txt:
2016-04-18.sql:
- select sysdate from dual;
- SELECT last_name
- FROM employees
- WHERE hire_date = to_date ('17-FEB-96','DD-MON-RR') ;
- SELECT employee_id,last_name, manager_id
- FROM employees
- WHERE manager_id IS NULL ;
- --ERROR
- SELECT employee_id,last_name, manager_id
- FROM employees
- WHERE manager_id = NULL ;
- SELECT last_name, job_id, department_id, hire_date
- FROM employees
- ORDER BY hire_date DESC ;
- SELECT employee_id, last_name, salary*12 annsal , department_id
- FROM employees
- ORDER BY department_id desc ;
- SELECT last_name, department_id, salary
- FROM employees
- ORDER BY department_id, salary DESC;
- -----
- select * from user_ind_columns c
- where c.TABLE_NAME='EMPLOYEES';
-
- select * from user_indexes i
- where i.INDEX_NAME='EMP_NAME_IX';
-
- select
- SUBSTR('HelloWorld',-1,5)
- from dual;
-
- select
- SUBSTR('HelloWorld',-5)
- from dual;
- select
- SUBSTR('HelloWorld',5)
- from dual;
-
- -----
- select * from database_properties;
-
- select INSTR('HelloWorld', 'Z') from dual;
- select replace ( 'HelloWorld','W' , '')
- from dual;
-
-
- select * from employees where employee_id =&s_7;
复制代码
|
|