Home > database >  Turning a column for help
Turning a column for help

Time:11-21



Small white novice a,
How to make the first line landscape under a name is the name of the field? And then the digital landscape under the total field called?

CodePudding user response:

Is this a few fields, honestly to write a good
 
Select the 'a' as the name, as a total from sometable union all
Select 'a (1) as the name, a (1) as the total from sometable union all
Select 'a (2) as the name, a (2) as the total from sometable union all
Select 'a (3) as the name, a (3) as the total from sometable union all
Select 'a (4) as the name, a (4) as the total from sometable

CodePudding user response:

 
Select the 'a' as the name, as a total from sometable union all
Select 'a (1) as the name, [a] (1) as the total from sometable union all
Select 'a (2) as the name, [a] (2) as the total from sometable union all
Select 'a (3) as the name, [a] (3) as the total from sometable union all
Select 'a (4) as the name, [a] (4) as the total from sometable
  • Related