Union select null, null, null, null, null, null, null from information_schema.tables. for a small database containing three tables. this instruction is used in sql injection I tried it and it worked but I didn't really know how it works can somebody help me...
qndbq7bbxilyCzFA') UNION ALL SELECT NULL,NULL,NULL,CONCAT(0x716e646271,IFNULL(CAST(grantee AS CHAR),0x20),0x716a716771),NULL FROM INFORMATION_SCHEMA.USER_PRIVILEGES#qjqgq.
UNION ALL SELECT NULL, *, NULL, NULL FROM email. I understand what this does and why; the hacker needs to create a query that has the same number of columns as the query it's being merged with, and shifted around the * to make sure the emails are displayed. That's not my question.
The reasoning is that a null means "unknown", so the result of any comparison to a null is also "unknown". So you'll get no hit on rows by coding where my_column = null. SQL provides the special syntax for testing if a column is null, via is null and is not null, which is a special condition to test for a...
Даже выражение NULL != NULL не будет истинным, ведь нельзя однозначно сравнить одну неизвестность с другой.
Note: A NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation!
Предикат IS NULL позволяет проверить отсутствие (наличие) значения в полях таблицы. Использование в этих случаях обычных предикатов сравнения может привести к неверным результатам, так как сравнение со значением NULL дает результат UNKNOWN (неизвестно).
Если значение expression равно NULL, IS NULL возвращает TRUE; в противном случае возвращается значение FALSE.If the value of
Тем не менее, NULL, как NULL-значение, часто используется в SQL. Предположим, появился покупатель, которому еще не назначен продавец.
NULL в Системах управления базами данных (СУБД) — специальное значение (псевдозначение), которое может быть записано в поле таблицы базы данных (БД). NULL соответствует понятию «пустое поле», то есть «поле, не содержащее никакого значения».