首页
it技术
登录
6mi
u
盘
搜
搜 索
it技术
MySQL防止重复插入(数据库层where方法解决)
MySQL防止重复插入(数据库层where方法解决)
it
2026-03-06
5
直接贴出解决的SQL:
INSERT
INTO
tablename
(
属性
1
,
属性
2
)
SELECT
'值1'
,
'值2'
FROM
dual
WHERE
EXISTS
(
SELECT
1
FROM
tablename
WHERE
)
;
参考博客:https://blog.csdn.net/weixin_40805079/article/details/84872998
转载请注明原文地址: https://lol.8miu.com/read-34983.html
最新回复
(
0
)