Tapahtumat
31. maalisk. klo 23 - 2. huhtik. klo 23
Suurin SQL-, Fabric- ja Power BI -oppimistapahtuma. 31. maaliskuuta – 2. huhtikuuta. Käytä koodia FABINSIDER säästääksesi 400 dollaria.
Rekisteröidy jo tänäänTätä selainta ei enää tueta.
Päivitä Microsoft Edgeen, jotta voit hyödyntää uusimpia ominaisuuksia, suojauspäivityksiä ja teknistä tukea.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
SQL analytics endpoint in Microsoft Fabric
Warehouse in Microsoft Fabric
SQL database in Microsoft Fabric
The equal sign (=) is the only Transact-SQL assignment operator. In the following example, the @MyCounter
variable is created, and then the assignment operator sets @MyCounter
to a value returned by an expression.
DECLARE @MyCounter INT;
SET @MyCounter = 1;
The assignment operator can also be used to establish the relationship between a column heading and the expression that defines the values for the column. The following example displays the column headings FirstColumnHeading
and SecondColumnHeading
. The string xyz
is displayed in the FirstColumnHeading
column heading for all rows. Then, each product ID from the Product
table is listed in the SecondColumnHeading
column heading.
-- Uses AdventureWorks
SELECT FirstColumnHeading = 'xyz',
SecondColumnHeading = ProductID
FROM Production.Product;
GO
Operators (Transact-SQL)
Compound Operators (Transact-SQL)
Expressions (Transact-SQL)
Tapahtumat
31. maalisk. klo 23 - 2. huhtik. klo 23
Suurin SQL-, Fabric- ja Power BI -oppimistapahtuma. 31. maaliskuuta – 2. huhtikuuta. Käytä koodia FABINSIDER säästääksesi 400 dollaria.
Rekisteröidy jo tänään