Hi,
how can I declare a variable in an UPDATE-Query without having to set a column information?
The following example works, but needs to have a dummyColumn to set in order to have a possibility to declare @.
UPDATE
table AS T
SET
T.dummyColumn = @test:= 15,
T.realColumn = @test
But I want to have something like
UPDATE
table AS T
SET
@test := 15,
T.realColumn = @test
Please don't say "Set T.realColumn = 15" - my situation is more complex and I just need to know how a variable can be declared without a dummy-column. 😉
Thx for your advises!