Ordering by a field not in the select statement in SQL

后端 未结 3 1938
独厮守ぢ
独厮守ぢ 2021-01-19 18:49

I need to create a query that pulls only the customer_no column (because the software restrictions are as such, and I can\'t code it externally). But I need to be able to so

3条回答
  •  庸人自扰
    2021-01-19 18:54

    This does not look like mysql.

    Anyway... you could try an ordered sub-select IE

    From (select * from T_CUSTOMER order by create_dt) a WITH (NOLOCK)
    

    I hope this helps.

提交回复
热议问题