//author 满晨晨
//time 2009 4 13上午
PML语句 insert delete update
建表结构
先建主表
再建从表
先确定数据类型
表之间的主键外键之间的数据类型必须一样
主键外键 主键外键都允许多个
注意业务逻辑
报错
数据类型不匹配
插入的数值过大
DQL查询数据
过滤查询
select 列
from 表
where 条件
order by desc asc排序
||连接符 select id||_||name as user_info
between and 包含边界值 between 5 and 10
select * from orders where order_date between '01-2月-2004' and '31-5月-2004'
或者 where order_date between to_date('2004/2/1','yyyy/mm/dd') and to_date('2004/5/31','yyyy/mm/dd')
to_date 是一种函数 转换不同日期格式
默认系统时间
alter table orders modify order_date default sysdate
あいうえお アイウエオ
かきくけこ カキクケコ
さしすせそ サシスセソ
たちつてと タチツテト
なにぬねの ナニヌネノ
はひふへほ ハヒフヘホ
まみむめも マミムメモ
やいゆえよ ヤイユエヨ
らりるれろ ラリルレロ
わいうえを ワイウエヲ
is null 查询是否存在
alter table products modify prod_id default 0.0修改某一段的默认值
alter 修改某一列的默认值
已经登记了的 is not null
select * from products where (vend_id='DLL01' OR vend_id='BRS01') and prod_price >10
排序查询
模糊查询
统计查询
like 'fish%'
like '%fish%'