带限制条件的查询和表达式查询
This commit is contained in:
parent
cbd24d1714
commit
155d5aa380
20
数据库/头歌/带限制条件的查询和表达式查询/带限制条件的查询和表达式查询.sh
Normal file
20
数据库/头歌/带限制条件的查询和表达式查询/带限制条件的查询和表达式查询.sh
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
USE Mall
|
||||||
|
Go
|
||||||
|
|
||||||
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
---------- retrieving with limited ----------
|
||||||
|
-- ********** Begin ********** --
|
||||||
|
SELECT prod_name
|
||||||
|
FROM Products
|
||||||
|
WHERE prod_name LIKE '%toy%'
|
||||||
|
-- ********** End ********** --
|
||||||
|
GO
|
||||||
|
|
||||||
|
---------- retrieving with expression ----------
|
||||||
|
-- ********** Begin ********** --
|
||||||
|
SELECT prod_price, prod_price * 0.8 AS discount_price
|
||||||
|
FROM Products
|
||||||
|
WHERE prod_price > 3
|
||||||
|
-- ********** End ********** --
|
||||||
|
GO
|
Loading…
x
Reference in New Issue
Block a user