Oracle
SqlServer2000 2005
MySql
DB2
ORACLE sun SUN
数据库 DataBase db
存储数据
数据 Data
数字 符号 字符 信息
DBMS 数据库管理系统
SQL : 结构化查询语言
笔试: scjp sql 20 - 30%
Oracle 10g XE
Oracle 9i
SQL:
CRUD
增删改查
DDL
DML
DCL: DBA
查询数据库中所有的表:
select table_name from user_tables;
SELECT 要查的数据 from 从哪里查
1. 查什么
2. 从哪里查
查询 s_emp 所有行所有列
select * from s_emp ;
指定列查询 (字段名之间使用逗号分隔)
select first_name , last_name from s_emp ;
SELECT last_name, salary * 12, commission_pct from s_emp;
使用NVL函数空值问题
SELECT last_name, title, salary*commission_pct/100 + salary from s_emp;
SELECT last_name, title, salary*NVL(commission_pct,0)/100 + salary from s_emp;
字段别名
as 别名 " 别 名 "
字符连接
select first_name || last_name " 姓 名 " from s_emp ;
DISTINCT &n