Variable with Declare
Hello,
how is it possible to declare variables?
I tried this one, but there was no result:
DECLARE @BLZ As varchar(5) = '35024' ;
Select
Konto.Bankleitzahl,
Konto.Kontonummer
From
Konto
Where
Konto.Bankleitzahl = @BLZ
how is it possible to declare variables?
I tried this one, but there was no result:
DECLARE @BLZ As varchar(5) = '35024' ;
Select
Konto.Bankleitzahl,
Konto.Kontonummer
From
Konto
Where
Konto.Bankleitzahl = @BLZ
You can try to run this query by pressing the Ctrl button when clicking the Execute button, or simply by pressing the Ctrl+F5 keys.
Also there's another way to define parameters. Remove the DECLARE statement and replace the "@" symbol with ":" like this:
Where Konto.Banklezahl = :blz
You will be propmted for parameter value on executing the query.