??????SET??SELECT????????
???????????? ???????[ 2013/1/16 10:07:07 ] ????????
??????????????SET??SELECT??????????????????????????????????????????????Щ??????????????AdventureWorks??????????????
?????????????????
????????????????????????????SET????????????????????????????????????????SELECT ???????????????????
??????????????????????????SET???????
USE AdventureWorks
GO
-- ???????????SET
DECLARE @Var1ForSet varchar(50)
SET @Var1ForSet = (SELECT [Name] FROM Production.Product WHERE ProductNumber = 'HY-1023-70')
PRINT @Var1ForSet
GO
USE AdventureWorks
GO
-- ???????????SET
DECLARE @Var2ForSet varchar(50)
SET @Var2ForSet = (SELECT [Name] FROM Production.Product WHERE Color = 'Silver')
PRINT @Var2ForSet
GO
???????????????????
?????????SET??????????????????????SET??????????????SET???????????????????????
????????????????SELECT????????????
USE AdventureWorks
GO
-- ???SELECT ????????
DECLARE @Var1ForSelect varchar(50)
SET @Var1ForSelect = (SELECT [Name] FROM Production.Product WHERE ProductNumber = 'HY-1023-70')
PRINT @Var1ForSelect
GO
-- ???SELECT ????????
DECLARE @Var2ForSelect varchar(50)
SELECT @Var2ForSelect = [Name] FROM Production.Product WHERE Color = 'Silver'
PRINT @Var2ForSelect
GO
???????????????г????
?????????????????????????????????????á????SET???????Щ????
??????
???·???
??????????????????
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