samedi 6 mars 2021

MySql : fill a colomn thanks to a IF condition ? (see example inside ;) )

I've a database like that :

Name Town Type Brand Ref
Smith London Big Sony 1020
Carlos Rio Big Nokia 050
Francois Paris Little Sony 250

I'd need to obtain :

Name Town Big_Sony Big_Nokia Little_Sony Little_Nokia
Smith London 1020
Carlos Rio 050
Francois Paris 250

Is there any possibility, with IF condition, to fill the right colomn ? I don't really know if I'd be possible to do it ?

Thanks you for your precious help :-)

edit : I tried the Forpas suggestion, but I just add

Name Town Type Brand Ref
Roberto Roma Little Sony 100

but I have not more result :( see here

Aucun commentaire:

Enregistrer un commentaire