Hi,
Can we use MAX on a CHAR column?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Akash AhlawatPosted Dec 2, 2011, 4:51 AM
Thanks guys
Anuja PawarPosted Dec 1, 2011, 9:33 AM
where adtAddressTypeID is char(15) and it works fine
So max works fine with char type
Akash AhlawatPosted Dec 1, 2011, 7:19 AM
Pravin MorePosted Dec 1, 2011, 4:27 AM
its about function.
VulpesPosted Dec 1, 2011, 4:13 AM
See link below for confirmation:
http://msdn.microsoft.com/en-us/library/ms187751.aspx
Priya LingePosted Dec 1, 2011, 4:11 AM
Yes ,we can use max on char.
Example >
CREATE TABLE test ( id char(15), name
char(80) )
INSERT INTO test VALUES ( '10', 'luidgi');
INSERT INTO test VALUES ( '20', 'luis');
select * from test
SELECT max(id) FROM test
OutPut : 1 20
Hope this will help you.
Thanks.
Pravin MorePosted Dec 1, 2011, 4:09 AM
char is fixed length datatype which is limited to 8,000 characters in size.