由买买提看人间百态

topics

全部话题 - 话题: yearb
(共0页)
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语句把他们拼起来
(共0页)