Jump to content

Recommended Posts

Guest MikeJ
Posted

hi...i would like to know best practice when assigning a value to a variable

example below

 

set

or

select

 

declare @var1 varchar(25)

set @var1='abc'

select @var1='abc'

 

to me

set is implicit

select implies conditions

 

i see both used all over the place here at my new company....

so witch is better practice

 

tks

MJ

  • Replies 1
  • Created
  • Last Reply

Popular Days

Guest MikeJ
Posted

Disregard

 

Disregard

 

disregard this

"MikeJ" <vettes_n_jets@sbcglobal.net> wrote in message

news:6P4qi.29$591.25@nlpi070.nbdc.sbc.com...

> hi...i would like to know best practice when assigning a value to a

> variable example below

>

> set

> or

> select

>

> declare @var1 varchar(25)

> set @var1='abc'

> select @var1='abc'

>

> to me

> set is implicit

> select implies conditions

>

> i see both used all over the place here at my new company....

> so witch is better practice

>

> tks

> MJ

>


×
×
  • Create New...