mysql 1093 错误

1093错误:

   要更新某表,同时该表有字段值又来自该表的查询语句。

   例如:  

INSERT INTO m_bulletincategory
(
OrganizationKey
, CategoryName
, DisplayNo
, DisplayFlag
, LastUpdateLoginID
, LastUpdateTime
)
VALUES
(
‘eik549s2qefxr7v6lvkr‘
, ‘掲示板カテゴリ名 ‘
, (SELECT IFNULL(Max(DisplayNo),0) + 1 FROM  m_bulletincategory)
, 1
, 0
, Now()
)

解决办法,复查询

INSERT INTO m_bulletincategory
(
OrganizationKey
, CategoryName
, DisplayNo
, DisplayFlag
, LastUpdateLoginID
, LastUpdateTime
)
VALUES
(
‘eik549s2qefxr7v6lvkr‘
, ‘掲示板カテゴリ名 ‘
, (SELECT IFNULL(Max(DisplayNo),0) + 1 FROM (select * from m_bulletincategory) tt)
, 1
, 0
, Now()
)

mysql 1093 错误,布布扣,bubuko.com

mysql 1093 错误

上一篇:go的安装


下一篇:ERROR Error: Cannot find module ‘vue-loader-v16/package.json‘