BMS-HOSxP Community
HOSxP => การเขียน SQL Script => ข้อความที่เริ่มโดย: manoi ที่ มกราคม 14, 2008, 17:02:07 PM
-
ตัวอย่างครับ
SELECT @num := @num + 1 as row_number,a.* from pttype a, (SELECT @num := 0) d
-
ใช้อย่างไร กรณีไหนคะ มือใหม่ค่ะ
ขอบคุณมากค่ะ
-
ตัวอย่างจะแสดง row_number
SELECT @num := @num + 1 as pcu_report_id,a.name,a.sqlparam,a.sqltext,a.template,a.script,a.use_parameter,a.module,a.last_update,a.script_dfm,a.template_preview from reporttemplate a, (SELECT @num := 0) d
-
ตัวอย่างครับ
SELECT @num := @num + 1 as row_number,a.* from pttype a, (SELECT @num := 0) d
ขอบคุณครับ อ.MN ได้ความรู้เพิ่มอีกแล้ว
;D ;D ;D