SQL 欄位 手動遞增
SQL 欄位 手動遞增
原型:
UPDATE 表名 SET 欄位名 = 欄位名 + 1 WHERE 條件;
範例:
SQL = "UPDATE upload_data SET upload_msg='',try_count = (try_count + 1) WHERE upload_state='N' AND (LENGTH(upload_msg)>0) AND (try_count<100)";
SQL 欄位 手動遞增
原型:
UPDATE 表名 SET 欄位名 = 欄位名 + 1 WHERE 條件;
範例:
SQL = "UPDATE upload_data SET upload_msg='',try_count = (try_count + 1) WHERE upload_state='N' AND (LENGTH(upload_msg)>0) AND (try_count<100)";