选择auto_increment字段值

时间:2013-12-08 14:22:37

标签: mysql

我正在尝试将当前表的自动增量字段值与常量值进行比较,我尝试的方法低于查询:

WHERE (SELECT column_name FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name='clients') = '1'

它不会显示任何输出,它有什么问题吗?

1 个答案:

答案 0 :(得分:0)

WHERE (SELECT AUTO_INCREMENT FROM information_schema.columns WHERE table_schema = DATABASE() AND table_name='clients') = <your number>

你应该尝试类似上面的内容