NOTE: Do not give update in the table.
/*minha_tabela*/ codigo jogos --------------------- 1 10 2 10 3 10 4 10 5 10 6 10
NOTE: Do not give update in the table.
/*minha_tabela*/ codigo jogos --------------------- 1 10 2 10 3 10 4 10 5 10 6 10
Expensive,
select codigo, 10 as jogos from minha_tabela
It works in SQL Server ...
If you need to use a variable, as it appears in the topic title, here is an approach:
-- código #1 (T-SQL)
declare @jogos int;
set @jogos= 10;
--
SELECT codigo, @jogos as jogos
from minha_tabela;