|
|
USE PUBS
SELECT MAX(DATALENGTH(title)) as TextLength FROM titles
In order to print the longest text in a descending order of the length of text, here's how to do so:
USE PUBS
SELECT title, DATALENGTH(title) as TextLength FROM titles
group by title
order by TextLength desc
Did you like this post?
|
|
|
||
|
|
|
|
|
|
|
subscribe via rss |
|
subscribe via e-mail |
|
|
print this post |
|
follow me on twitter |






comments
1 Response to "Find the length of the longest text in a column"Useful post.
Regards!
Agustin.
Post a Comment