?? update方法好.sql
字號:
/*UPDATE titles
SET ytd_sales = titles.ytd_sales + sales.qty
FROM titles, sales
WHERE titles.title_id = sales.title_id
AND sales.ord_date = (SELECT MAX(sales.ord_date) FROM sales)
UPDATE titles
SET ytd_sales =
(SELECT SUM(qty)
FROM sales
WHERE sales.title_id = titles.title_id
AND sales.ord_date IN (SELECT MAX(ord_date) FROM sales))
FROM titles, sales
*/
update t_print1 set lj_month=null,lj_year=null
update t_print1
set lj_month = (select sum(money) from t_mx
where t_print1.dwdm=t_mx.dwdm and t_print1.sfdm=t_mx.sfdm and t_mx.IN_Time>='20060601')
from t_print1,t_mx
update t_print1
set lj_year = (select sum(money) from t_mx
where t_print1.dwdm=t_mx.dwdm and t_print1.sfdm=t_mx.sfdm)
from t_print1,t_mx
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -