INSERT INTO tab_outbound (o_gid, o_wid, odate, outbound, outmoney) SELECT gid, wid, CURDATE(), gnumber, gnumber*gprice FROM tab_goods, tab_warehouse WHERE gcategory = '电脑' AND wname = '仓库A'

用CREATE TABLE tab_goods gid int11 NOT NULL AUTO_INCREMENT gcategory varchar20 DEFAULT NULL gname varchar20 DEFAULT NULL gmodel varchar20 DEFAULT NULL gprice double DEFAULT NULL gnumber int11 DE

原文地址: http://www.cveoy.top/t/topic/iJ64 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录