??????SET??SELECT????????
???????????? ???????[ 2013/1/16 10:07:07 ] ????????
?????????????????????
??????????????????????????SELECT ?????????л???????????????????????????????ζ?дSET???????????????????
USE AdventureWorks
GO
-- ?????
DECLARE @var1 VARCHAR(50)
DECLARE @var2 VARCHAR(50)
DECLARE @var3 VARCHAR(50)
SELECT @var1 = 'Value1'?? @var2 = 'Value2'?? @var3 = 'Value3'
PRINT @var1
PRINT @var2
PRINT @var3
GO
-- ????????????
DECLARE @name VARCHAR(50)
DECLARE @productNo VARCHAR(25)
DECLARE @color VARCHAR(15)
SELECT @name = [Name]?? @productNo = ProductNumber?? @color = Color
FROM Production.Product
WHERE ProductID = 320
PRINT @name
PRINT @productNo
PRINT @color
GO
???????????????
?????????????SET???????????????????????????
USE AdventureWorks
GO
-- ?????
DECLARE @var1 VARCHAR(50)
DECLARE @var2 VARCHAR(50)
DECLARE @var3 VARCHAR(50)
SET @var1 = 'Value1'
SET @var2 = 'Value2'
SET @var3 = 'Value3'
PRINT @var1
PRINT @var2
PRINT @var3
GO
-- ???????????
DECLARE @name VARCHAR(50)
DECLARE @productNo VARCHAR(25)
DECLARE @color VARCHAR(15)
SET @name =(SELECT [Name] FROM Production.Product WHERE ProductID = 320)
SET @productNo = (SELECT ProductNumber FROM Production.Product WHERE ProductID = 320)
SET @color = (SELECT Color FROM Production.Product WHERE ProductID = 320)
PRINT @name
PRINT @productNo
PRINT @color
GO
????????????
????????????????????SELECT ?????????????????????????Ч??????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11