SqlServer와 Oracle에서 자주 사용하는 ql문장 4 부분/전역 변수

1752 단어
-- wh1        " "              288
update      set   =  +288 where    ='wh1' and    like '% %'

-- "  "          100,   1 
update      set   =(  -100)*2 where     in
   (select     from      where   ='  ')
   
--     "  "             80
update      set   =  +80 where   <
  ( select MIN(  ) from      where   ='  ')
  
--                        66  
update      set   =  -66 where   > all(
   select AVG(  ) from      group by    )

--                 
delete      where    in ( 
(select MAX(  ) from     ),
(select min(  ) from     )
)
   
--                   
delete      where   > (select AVG(  ) from      )

--  "  ","  "       
delete      where     in
    (select     from       where    in('  ','  '))

--             
declare @str1 char(10),@str2 varchar(50), @x1 int, @x2 real,@time1 datetime
set @str1='good'
set @str2='hello,how are you?'
set @x1=12
set @x2=15
set @time1='2009/05/06'
print @str1
print @str2
print @x1
print @x2
print @time1

--            
declare @str1 char(10),@str2 varchar(50), @x1 int, @x2 real,@time1 datetime
select @str1='good',@str2='hello,how are you?',@x1=12,@x2=15,@time1='2009/05/06'
select @str1 as     1,@str2 as     2,
       @x1 as     1,@x2 as     2,@time1 as       

--    
declare @x int
set @x=2000
select * from    where   >@x

--    
PRINT @@version

좋은 웹페이지 즐겨찾기