1
MySQL / Re: ขอตัวอย่างคำสั่ง Insert
« เมื่อ: ธันวาคม 26, 2018, 15:23:13 PM »
insert into pp_special (pp_special_id,vn,hn,pp_special_type_id)
(select get_serialnumber('pp_special_id') as pp_special_id,vn,hn,'1' from ovst where vstdate between '2018-12-26' and '2018-12-26')
ลองประยุกต์ใช้ดูนะคะ ไม่แน่ใจว่าอยากได้จากตารางไหนไปใส่เลยสมมุติเป็น ovst ค่ะ
(select get_serialnumber('pp_special_id') as pp_special_id,vn,hn,'1' from ovst where vstdate between '2018-12-26' and '2018-12-26')
ลองประยุกต์ใช้ดูนะคะ ไม่แน่ใจว่าอยากได้จากตารางไหนไปใส่เลยสมมุติเป็น ovst ค่ะ