Is there any function like "strlen" in mysql?
+2
A:
Mysql does have a length function to return the length of a string.
so you could do something like.
select * from some_table where length(some_string) > 0;
BrennaSoft
2010-07-01 12:20:08
+1
A:
The following query would do the job for you.
select length(your_text_column) from sample_table where length(some_column) > 0
Bragboy
2010-07-01 12:21:00
+2
A:
How to select one text column, which string length >0 ?
You could compare to the empty string:
SELECT yourcolumn
FROM yourtable
WHERE yourcolumn <> ''
Mark Byers
2010-07-01 12:22:11
another clever way, thank you.
lovespring
2010-07-01 12:35:45
+1
A:
You can do it with using LENGTH
keyword
SELECT * FROM table WHERE LENGTH (name) > 150;
Judas Imam
2010-07-01 12:23:32