salut,
j'ai une table du type col 1 // col 2 // col 3
et je voudrai faire une sélection qui me renvoit
1 "col 1"
2 "col 2"
3 "col 3"
comment sélectionner les noms de colonnes d'une table ??
merci d'avance
juan
Version imprimable
salut,
j'ai une table du type col 1 // col 2 // col 3
et je voudrai faire une sélection qui me renvoit
1 "col 1"
2 "col 2"
3 "col 3"
comment sélectionner les noms de colonnes d'une table ??
merci d'avance
juan
j'ai trouvé c'est bon... dsl d'avoir posté trop vite !
Juan
alors si tes colonne sont de la meme nature texte, date ou numéric
alors tu fais
sinon si tes colonne ne sont pas de la meme natureCode:
1
2
3
4
5
6
7
8
9 select Col1 from tatable union select Col2 from tatable union select Col3 from tatable
tu fais un convert varchar par exemple
Code:
1
2
3
4
5
6
7
8
9 select convert(varchar,Col1) from tatable union select convert(varchar,Col2) from tatable union select convert(varchar,Col3) from tatable