SELECT favorite_id,MO,name,image_id,case image_id
when 0 then (select image_path as image_path from images where image_id in (select default_image from registration where reg_id=9))
else (select image_path as image_path from images where image_id=b.image_id and active=1)
end
FROM buddies b where reg_id=9
この選択で:
select image_path as image_path
列名に名前を付ける必要がありますが、クエリの実行時に列の表示名が表示されない場合の選択のため...
この列に表示用の名前を付けるにはどうすればよいですか?