摘要:
如有以下sql语句:select name from student where id='1003' union allselect name from student where id='1001' union allselect name from student where id='1004'查询出来的结果顺序是未知的。现在必须按照一定的顺序显示查询的结果,可以用这样的方法:select name from (select name ,2 flag from student where id='1003' union all 阅读全文