Delete from sql where row strlen?

Delete from sql where row strlen?

It you want to select the rows that are equal or lower in lenght, use:

1
SELECT * FROM table WHERE CHAR_LENGTH(row) <= 2

It you want to delete the rows that are equal or lower in lenght, use:

2
DELETE FROM table WHERE CHAR_LENGTH(row) <= 2

This way, you can easily delete the rows that seem empty.
If you want to delete empty rows, use:

3
DELETE FROM table WHERE row = '';

Add a comment: