#列名
select COLUMN_NAME from information_schema.columns
where TABLE_SCHEMA=‘yunpiaobox_db‘ and table_name=‘t_box_status‘
TABLE_SCHEMA: 数据库名称 table_name:表名
#列名字符串 按,分隔
select
GROUP_CONCAT(COLUMN_NAME separator ‘,‘) ‘逗号分隔‘,
GROUP_CONCAT(CONCAT(‘NEW.‘, COLUMN_NAME) separator ‘,‘) ‘NEW.字段 逗号分隔‘,
GROUP_CONCAT(CONCAT(COLUMN_NAME, ‘=NEW.‘, COLUMN_NAME) separator ‘,‘) ‘字段=NEW.字段 逗号分隔‘
from information_schema.columns
where TABLE_SCHEMA=‘yunpiaobox_db‘ and table_name=‘t_box_status‘
最后
以上就是高贵小蝴蝶最近收集整理的关于mysql 触发器连表查询_Mysql 触发器 A表记录到B表的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复