我想更新字段的值,如果字符串列在兩個數字之間。 UPDATE SAMPLE.EXAMPLE
SET modNum = CONCAT(modNum,"26")
WHERE modNum NOT LIKE '%26%'
AND (procKey BETWEEN 90000 AND 99123 OR procKey = 77444);
不幸的是我得到一個錯誤: Error Code:
當我執行此SQL查詢: UPDATE shop_category
SET name = 'Secolul XVI - XVIII'
AND name_eng = '16th to 18th centuries'
WHERE category_id = 4768
我收到以下錯誤: 1292 - Truncated incorrect DOUBLE value: 'Secolul X
我的程序有問題。我嘗試從銷售表中獲取值並使用它們進行查詢。 過程是這樣的: DROP PROCEDURE IF EXISTS turnover;
DELIMITER $$
CREATE PROCEDURE turnover()
BEGIN
DECLARE col INT;
DECLARE q TEXT;
DECLARE i INT DEFAULT 0;