Quantcast
Channel: SQLServerCentral » SQL Server 2008 » SQL Server 2008 - General » Latest topics
Viewing all articles
Browse latest Browse all 16406

MAX behavior difference with nvarchar and varchar column types

$
0
0
Hi All, We are getting different results for MAX function with nvarchar and varchar columns.create table my_table(id1 nvarchar(10), id2 varchar(10);insert into my_table('-1','-1);insert into my_table('1','1);select max(id1) from my_table; -> -1but select max(id2) from my_table; -> 1is it the default behavior? Any way to change this?Regards

Viewing all articles
Browse latest Browse all 16406

Latest Images

Trending Articles



Latest Images