找表是否存在mysql保留字段

sql 复制代码
SELECT column_name
FROM information_schema.columns
WHERE table_name = '表名称'
  AND column_name IN
      ('action', 'add', 'aggregate', 'all', 'alter', 'after', 'and', 'as', 'asc', 'avg', 'avg_row_length',
       'auto_increment', 'between', 'bigint', 'bit', 'binary', 'blob', 'bool', 'both', 'by', 'cascade', 'case', 'char',
       'character', 'change', 'check', 'checksum', 'column', 'columns', 'comment', 'constraint', 'create', 'cross',
       'current_date', 'current_time', 'current_timestamp', 'data', 'database', 'databases', 'date', 'datetime', 'day',
       'day_hour', 'day_minute', 'day_second', 'dayofmonth', 'dayofweek', 'dayofyear', 'dec', 'decimal', 'default',
       'delayed', 'delay_key_write', 'delete', 'desc', 'describe', 'distinct', 'distinctrow', 'double', 'drop', 'end',
       'else', 'escape', 'escaped', 'enclosed', 'enum', 'explain', 'exists', 'fields', 'file', 'first', 'float',
       'float4', 'float8', 'flush', 'foreign', 'from', 'for', 'full', 'function', 'global', 'grant', 'grants', 'group',
       'having', 'heap', 'high_priority', 'hour', 'hour_minute', 'hour_second', 'hosts', 'identified', 'ignore', 'in',
       'index', 'infile', 'inner', 'insert', 'insert_id', 'int', 'integer', 'interval', 'int1', 'int2', 'int3', 'int4',
       'int8', 'into', 'if', 'is', 'isam', 'join', 'key', 'keys', 'kill', 'last_insert_id', 'leading', 'left', 'length',
       'like', 'lines', 'limit', 'load', 'local', 'lock', 'logs', 'long', 'longblob', 'longtext', 'low_priority', 'max',
       'max_rows', 'match', 'mediumblob', 'mediumtext', 'mediumint', 'middleint', 'min_rows', 'minute', 'minute_second',
       'modify', 'month', 'monthname', 'myisam', 'natural', 'numeric', 'no', 'not', 'null', 'on', 'optimize', 'option',
       'optionally', 'or', 'order', 'outer', 'outfile', 'pack_keys', 'partial', 'password', 'precision', 'primary',
       'procedure', 'process', 'processlist', 'privileges', 'read', 'real', 'references', 'reload', 'regexp', 'rename',
       'replace', 'restrict', 'returns', 'revoke', 'rlike', 'row', 'rows', 'second', 'select', 'set', 'show',
       'shutdown', 'smallint', 'soname', 'sql_big_tables', 'sql_big_selects', 'sql_low_priority_updates', 'sql_log_off',
       'sql_log_update', 'sql_select_limit', 'sql_small_result', 'sql_big_result', 'sql_warnings', 'straight_join',
       'starting', 'status', 'string', 'table', 'tables', 'temporary', 'terminated', 'text', 'then', 'time',
       'timestamp', 'tinyblob', 'tinytext', 'tinyint', 'trailing', 'to', 'type', 'use', 'using', 'unique', 'unlock',
       'unsigned', 'update', 'usage', 'values', 'varchar', 'variables', 'varying', 'varbinary', 'with', 'write', 'when',
       'where', 'year', 'year_month', 'zerofill');
相关推荐
小白男神5 天前
MySQL进阶学习四(存储过程、游标、触发器)
mysql
这个DBA有点耶5 天前
MVCC深入:Read View、版本链与快照读——InnoDB并发控制的内核
数据库·mysql·架构
DBA_G5 天前
从地面到云霄:GBase数据库在民航三大场景的落地实践
数据库
自由能燃气设备5 天前
商用全预混低氮冷凝锅炉免费方案vs付费方案对比+选型避坑指南
大数据·数据库·人工智能
科创致远5 天前
科创致远 ESOP 系统核心效能与实战价值展示
大数据·数据库·人工智能·精益工程
kybs19915 天前
全球灾害数据分析可视化 毕业设计-附源码66794
vue.js·spring boot·mysql·安全·django·c#·asp.net
2601_962218615 天前
万象生鲜系统称重自动多退少补算法解决生鲜非标品痛点
大数据·数据库·人工智能·python·算法
程序猿_极客5 天前
【免费】分享一套优质的基于SSM的校园失物招领系统的设计与实现,源码+文档+视频详解(讲解)
java·mysql·ssm·课程设计·失物招领系统
张洛闻Eren5 天前
k8s云原生【第十课】:水平 Pod 自动扩缩容
运维·数据库·云原生·kubernetes·github
于平安5 天前
MySQL-触发器
数据库·mysql