練習
--use Northwind
--GO
--select CustomerID,CompanyName,ContactName
--,ContactTitle,Address,City,Region,
--PostalCode,Country,Phone,Fax
--From Northwind.dbo.Customers
--GO
----查版本
--select @@VERSION
----查時間
--select GETDATE()
--use Northwind
--Go
--select CategoryName AS [產品名稱], Description AS [說明]
--from dbo.Categories
--USE Northwind
--select distinct Title from dbo.Employees
--use Northwind
--GO
--select * from dbo.products
--order by UnitPrice DESC
--select categoryid, productname, unitprice as [單價]
--from dbo.products
--order by 2
use Northwind
select P.* from (
select productid, productname, categoryid, unitprice [單價]
from products
) AS P
order by [單價]
沒有留言:
張貼留言