------解决方案-------------------- select s.name, c.value from code c, student s where s.sex = c.value ------解决方案-------------------- SELECT T.NAME,DECODE(T.SEX,1,'男',2,'女','未知性别') FROM STUDENT;
性别这个字段...呼呼 ------解决方案--------------------
或者 是这样 写
select s.name, c.value as sex from student s, code c where s.id = c.sex ------解决方案--------------------
后面的有点问题吧
select s.name, c.value as sex from student s, code c where c.id = s.sex