您现在的位置是:课程教程文章

mysql如何判断是否存在某个字段

2023-12-18 19:09课程教程文章 人已围观

判断表中一个字段是否存在的方法:

语法:

select count(*) from information_schema.columns where table_name = '表名' and column_name = '字段名'

sql例子:

select count(*) from information_schema.columns where table_name = 't_iov_vehicle_owner_info' and column_name = 'id'

推荐:MySQL教程

课程教程:mysql如何判断是否存在某个字段

上一篇:centos7安装后vim用不了如何解决

下一篇:没有了

站点信息

  • 文章统计篇文章