如何提取CREATE TABLE SQL语句括号内的代码行?
提取CREATE TABLE语句括号内的内容
没问题,我已经帮你从给定的SQL语句里提取出括号内部的字段定义内容啦,结果如下:
ccodealpha char(3) not null comment 'ISO alpha.', ccodenumeric char(3) not null comment 'ISO numeric', cminorunit varchar(4) default 0 comment 'Minor unit.', cname varchar(80) not null comment 'Name of the currency.', centity varchar(100) not null comment 'Entity.'
如果需要手动提取的话,你可以这么操作:
- 定位SQL语句里第一个左括号
(,再找到与之对应的最外层右括号)(也就是engine=innodb前的那个右括号) - 直接移除这两个括号,剩下的就是目标内容啦
内容的提问来源于stack exchange,提问作者apetitflores
相关产品推荐
相关产品推荐

