SQL Server: replace constant values with name -


i have query:

select *  table  value = 1 

but value used in lot of places

and want use like:

uservalue = 1  select *  table   value = $uservalue 

is feasible?

thank you.

when want use value @ lots of places use:

declare @uservalue int  set @uservalue = 1  select * table  value= @uservalue 

below link provide details on how use local variables:

http://technet.microsoft.com/en-us/library/aa258839%28v=sql.80%29.aspx

also these basics. try find own.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

qt - How to embed QML toolbar and menubar into QMainWindow -