Correct name lengths in SQL queries