mysql2011. 8. 29. 02:28
use tempDB

create table maxTbl
(col1 varchar(max),
col2 nvarchar(max))

insert into maxTbl values(replicate('A',1000000),
replicate('가',1000000))


select * from maxtbl

select len(col1) as [varchar(max)],len(col2) as [nvarchar(max)]
from maxtbl


-- 순위 함수 row_number()

use sqlDB
select row_number() over(order by height desc) [키큰 순위],
name, addr, height
from usertbl
order by height desc
Posted by babuzzzy