找表是否存在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');
相关推荐
JosieBook11 分钟前
【数据库】把数据优势转化为决策优势:TimechoAI时序大模型使用解析
数据库
会编程的吕洞宾1 小时前
MySQL 慢查询从5秒到50毫秒:索引失效六大场景定位与实战调优
数据库·mysql
浅念-1 小时前
MySQL 索引底层完整详解|磁盘Page|B+树推导|聚簇非聚簇索引|索引SQL操作
大数据·数据库·b树·sql·mysql·面试·职场和发展
小马过河R1 小时前
数据仓库入门:是什么、怎么做、和数据库有什么区别?
大数据·数据库·数据仓库·架构·驾驭工程·fde
Mico181 小时前
Percona Toolkit 3.5.7 完整实战笔记(从入门到精通)
mysql
小白勇闯网安圈1 小时前
Django Form 组件详解:从表单生成到 ModelForm 数据校验
数据库·django·sqlite
梦想不只是梦与想2 小时前
MySQL 数据库(二):数据类型
数据库·mysql·数据类型
野生技术架构师2 小时前
Redis 和 MySQL 如何保证数据一致性?先更新数据库还是先删缓存,延迟双删、MQ、Canal 一次讲透
数据库·redis·缓存
鸽芷咕2 小时前
SQL Server数据迁移到金仓数据库复盘:从怕性能翻车,到TPS提升60%
数据库
jason.zeng@15022073 小时前
服务器磁盘读写效率,网络吞吐量查看,mysql性能调优
服务器·网络·mysql