c*****d 发帖数: 6045 | 1 比如说每个table都有如下类似字段
tableA: yearA, monA, dateA, otherA
tableB: yearB, monB, dateB, otherB
。。。。
tableZ: yearZ, monZ, dateZ, otherZ
你想写一个sql语句,完成下面的功能,是吗?
select yearA, monA, dateA from tableA;
select yearB, monB, dateB from tableB;
。。。。
select yearZ, monZ, dateZ from tableZ; |
|
c*****d 发帖数: 6045 | 2 en, 比如说每个table都有如下类似字段,但是名字没有规则
tableA: yearAA, AmonA, dateA, otherA
tableB: yearB, monBBBB, dateBB, otherB
。。。。
tableZ: yearZ, monZZ, dateZZZ, otherZ
你想完成下面的功能
select yearAA, AmonA, dateA from tableA;
select yearB, monBBBB, dateBB from tableB;
。。。。
select yearZ, monZZ, dateZZZ from tableZ;
在information_schema.columns中有字段位置,字段名字,表名
用sql语句把他们拼起来 |
|