您的当前位置:首页 --> MYSQL教程 --> 解析mysql中的auto_increment的问题 |
MYSQL教程 解析mysql中的auto_increment的问题 |
浏览次数:576 关键词 ( ) |
查看使用该CPU的产品 查看CPU天梯 |
CPU型号:解析mysql中的auto_increment的问题 |
主频:Ghz |
睿频:Ghz |
核心数:个 |
不支持超核心 |
制作工艺: |
插槽类型: |
功耗:0W |
L3缓存:0MB |
支持最大内存: 0GB |
CPU详细参数 |
今儿在逛论坛时,发现一个看似很简单的问题,却引起了大家的广泛关注: 如果表的类型是MyISAM,那么是18。 自己也做了个实验,结果证实了上面的说法。真是惭愧啊,看似简单的问题自己也打错了。 复制代码 代码如下: mysql> select * from test1; +----+-----------+ | id | name | +----+-----------+ | 1 | 陈兵辉 | | 2 | chen | | 3 | chen | | 4 | chen | | 5 | chen | | 6 | chen | | 7 | chen | | 8 | chen | | 9 | chen | | 10 | chen | | 11 | chen | +----+-----------+ 11 rows in set (0.00 sec) mysql> delete from test1 where id in (10,11,9); mysql> show create table test1; Oracle is a registered trademark of Oracle Corporation and/or its Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> use test; Database changed 2,另外还有一个就是获取当前数据库表的自增字段数。 复制代码 代码如下: mysql> select last_insert_id(); +------------------+ | last_insert_id() | +------------------+ | 0 | +------------------+ 1 row in set (0.00 sec) |
下一个产品 SQL计算timestamp的差值的方法 上一个产品 jdbc操作数据库的基本流程详解 |