Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What's the difference?
Message
De
06/09/1999 08:50:35
 
 
À
04/09/1999 14:43:27
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00261530
Message ID:
00261729
Vues:
21
See inline

>In a stored proc, what would be the difference between the following statements?
>
>SELECT cretvalue="string value"

This statement will return a result set, 1 row, 1 column. The column heading will be 'cretvalue' and the data value will be 'string value'


>
>and
>
>SELECT @cretvalue="string value"

This is an assignment statement. The local variable @cretvalue will be assigned the value of "string value"

>
>and
>
>SELECT cretvalue as @cretvalue

I've never seen this syntax. I tried duplicating it using the following batch but SQL Server 7.0 kicks back and error

DECLARE @mike varchar(10)
SET @mike 'x'
SELECT 123 AS @mike

Is the stored procedure small enough that you could post it?

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform