
MySql
鹏鹏博客
不念过往
不畏将来
把握现在
携梦前行
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mysql中You can't specify target table <tbl> for update in FROM clause报错
mysql中You can't specify target table <tbl> for update in FROM clause错误的意思是说,不能先select出同一表中的某些值,再update这个表(在同一语句中)。 例如下面这个sql:delete from tbl where id in( select max(id) from tbl a where E...转载 2018-06-29 10:17:32 · 194 阅读 · 0 评论 -
通过Mysql数据库的函数获取不重复的自增值
1.创建一个储值表:存储每次自增后的最新值,用于读取 CREATE TABLE `sequence` ( `name` VARCHAR(50) NOT NULL, //自增名 `current_value` INT(11) NOT NULL, //自增的最新值 `increment` INT(11) NOT NULL DEFAULT '1' //每次的...原创 2019-05-23 10:04:06 · 521 阅读 · 0 评论