declare @x char(10)
set @x='hai'
if(@x<>'hmai')//<>,=,>,<,>=.<=,!=
begin
print(@x)
end
declare @x char(10)
set @x='hai'
if(@x is not null)
begin
print(@x)
end
declare @x char(10)
set @x='hai'
if((@x<>'hai1')or(@x<>'hai2'))//or,and
begin
print(@x)
end
else
begin
print('else')
end
declare @x char(200)
set @x='select * from prgm'
Exec(@x)
Declare @ValidRule as varchar(10)
Set @ValidRule = 'False'
Declare @a as varchar(10)
Declare @prg as varchar(10)
Set @prg=null
Set @a=select * from program P where prg_id=isnull('+cast(@prg as varchar)+',P.prg) )//if @prg is null P.prg is assign to
Thursday, August 20, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment