I'm cleansing a database table so that I can build a data warehouse for my coursework, however first I need to make sure that the data is of a quality.
There are a lot of name entries have only a single letter. I want to delete those rows with a single script.
You can get the number of chars in the column name
with the function length()
delete from tablename
where length(trim(name)) < 2
The function trim() could also be useful in this case.