我在使用order by命令时遇到问题。由于last和first name连接成fullname,因此我不能按LastName排序,因为sql开发人员在连接后不识别LastName。我试图通过DoubleDip(Major1),LastName,FirstName进行订购。它只能通过DoubleDip订购。我该如何解决这个问题?
Create View A5T5 As
Select FirstName || ' ' || LastName As Fullname, StudentID, Upper(Major1) As DoubleDip
From A5
Where Upper(Major1)= Upper(Major2)
Order by DoubleDip, LastName, FirstName
答案 0 :(得分:0)
你应该可以这样做:
ORDER BY FirstName || ' ' || LastName