1
Reply

SQL,column header

Ask a question
Sreekanth

Sreekanth

14y
2.5k
1
hi,
this is ma table

column1 column2 column3
A         P1              1
A         P2               2
A         P3              3
B      P1                  4
B      P2                 5
B      P3            6
D     P1             7
E     P2               8
F    P3               9

i need a select query which givs reslut likethis:

if ma "where" condition is,  column2=p1
column1  P1
A           1
B           4
D           7,

iif ma "where" condition is,  column2=p2

columns1   P2
A              2
B              5
E               8

help me pls!!!!!!!!!! 

Answers (1)