스트링과 관련된 재밌는 쿼리

  • Post author:
  • Post category:
  • Post comments:0 Comments
  • Post last modified:May 4, 2004

1.
declare @tstr char(10)

1.1
set @tstr = ‘wow’
set @tstr = @tstr + ‘good’
select @tstr
1.2
set @tstr = ‘wow’
select @tstr +‘good’
select rtrim(@tstr) + ‘good’

2.
declare @tstr varchar(10)

2.1
set @tstr = ‘wow’
set @tstr = @tstr + ‘good’
select @tstr

2.2
set @tstr = ‘wow’
select @tstr +‘good’

한번 차례대로 실행시켜 보고, 비교해보세요.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.