DML,DDL
DML数据操作语言
SELECT
INSERT
DELETE
UPDATE
-------多表之间的关联更新
-------------UPDATE PLAT_ORG O SET OFFICE_ID=
(SELECT F.ID FROM PLAT_OFFICE F WHERE F.OFFICE_NAME=O.OFFICE_ID)
WHERE EXISTS(SELECT 1 FROM PLAT_OFFICE F WHERE F.OFFICE_NAME=O.OFFICE_ID);
------------ update 超过2个值
update customers a -- 使用别名
set (city_name,customer_type)=(select b.city_name,b.customer_type
from tmp_cust_city b
where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
DDL数据定义语言
CREATE
ALERT
TRUNCATE
DROP