找表是否存在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');
相关推荐
后端小张1 小时前
Redis 执行 Lua,能保证原子性吗?
数据库·redis·缓存
离开地球表面_991 小时前
索引失效?查询结果不正确?原来都是隐式转换惹的祸
数据库·后端·mysql
lipviolet1 小时前
Redis系列---Redission分布式锁
数据库·redis·分布式
Zhen (Evan) Wang1 小时前
.NET 6 API + Dapper + SQL Server 2014
数据库·c#·.net
毕设木哥2 小时前
25届计算机专业毕设选题推荐-基于python+Django协调过滤的新闻推荐系统
大数据·服务器·数据库·python·django·毕业设计·课程设计
洛阳泰山2 小时前
Llamaindex 使用过程中的常见问题 (FAQ)
java·服务器·数据库·python·llm·rag·llamaindex
没有名字的小羊2 小时前
Linux基础命令——账户简单管理
linux·运维·服务器·网络·数据库
smile_life_2 小时前
服务器非法关闭后MySQL服务启动失败
运维·服务器·mysql
单字叶2 小时前
MySQL数据库管理
数据库·mysql
Deryck_德瑞克2 小时前
mysql笔记—sql性能分析
笔记·sql·mysql