How to write this sql-english query correctly:
"SELECT zip FROM tblContacts WHERE [the number of characters in zips is less than or equal to 4]."
Thank.
Assuming what zipis the string:
zip
WHERE CHAR_LENGTH(zip) <= 4
must work.
Edit : There was initially some confusion as to whether the desired comparison was <, <=or >, but now Q has been edited to clarify, so I edited my A accordingly.
<
<=
>
SELECT zip FROM tblContacts WHERE CHAR_LENGTH(zip) > 0
I am sure there should be a better way, but ...:
SELECT zip FROM tblContacts WHERE zip LIKE '_' OR zip LIKE '__' OR zip LIKE '___' OR zip LIKE '____';
Source: https://habr.com/ru/post/1728777/More articles:Web Development Clustering Algorithms - algorithmclose batch file automatically - batch-filePHP error Unable to use return> value method in write context - phpDrawing a point using OpenGL, but not in immediate mode - user-interfacefonts not embedded Flash CS4 AS3 - flashMachine Gun Confusion - c ++Questions about checking user input in Objective-C, number vs string - cHaving a class without data is a good option for file manipulation? - c ++String matching in Python - pythonFailed to decode JSON stripslashed String? - jsonAll Articles