回答編集履歴

1 FROM 句追記

iruyas

iruyas score 418

2018/04/27 20:43  投稿

やり方は色々ありますが、1例として。
SELECT M_User.UserName
   , (SELECT M_Code.Name FROM M_Code WHERE M_Code.Kind=1 AND M_Code.ID=M_User.Authority) As Authority
   , M_User.Password
   , (SELECT M_Code.Name FROM M_Code WHERE M_Code.Kind=2 AND M_Code.ID=M_User.Sex) As Sex;
, (SELECT M_Code.Name FROM M_Code WHERE M_Code.Kind=1 AND M_Code.ID=M_User.Authority) As Authority
, M_User.Password
, (SELECT M_Code.Name FROM M_Code WHERE M_Code.Kind=2 AND M_Code.ID=M_User.Sex) As Sex
FROM M_User;

思考するエンジニアのためのQ&Aサイト「teratail」について詳しく知る