SQL NULL Values
A field with no value is known as a NULL value.It is possible that a new record is inserted into the table without adding a value to the column, then that field will be referred to as NULL value.
IS NULL Syntax :
The syntax of the IS NULL statement is −
SELECT column-names
FROM table-name
WHERE column-name IS NULL;
IS NOT NULL Syntax :
The syntax of the IS NOT NULL statement is −
SELECT column-names
FROM table-name
WHERE column-name IS NOT NULL;
NULL Example :
Consider the Customer table with the following records -
CustomerID |
CustomerName |
Age |
Address |
CustomerSalary |
1 |
Aarav |
28 |
Udaipur |
28000 |
2 |
Vivaan |
25 |
Mumbai |
null |
3 |
Reyansh |
28 |
null |
35000 |
4 |
Muhammad |
24 |
null |
50000 |
5 |
Sai |
null |
Mumbai |
27000 |
TEST CASE 1 :- The following code is an example, which would fetch the (CustomerName, Age, Address )lists all Customer from Customer table where Address is NULL.
SELECT CustomerName, Age, Address
FROM Customer
WHERE Address IS NULL;
The result for the respective sql query is as follows −
CustomerName |
Age |
Address |
Reyansh |
28 |
null |
Muhammad |
24 |
null |
TEST CASE 2:- The following code is an example, which would fetch the (CustomerName, Age, Address )lists all Customer from Customer table where Address IS NOT NULL.
SELECT CustomerName, Age, Address
FROM Customer
WHERE Address IS NOT NULL;
The result for the respective sql query is as follows −
CustomerName |
Age |
Address |
Aarav |
28 |
Udaipur |
Vivaan |
25 |
Mumbai |
Sai |
null |
Mumbai |
Visit :
Discussion
pHqghUme
-1 OR 2+974-974-1=0+0+0+1 --
pHqghUme
-1 OR 3+974-974-1=0+0+0+1 --
pHqghUme
-1 OR 3*2<(0+5+974-974) --
pHqghUme
-1 OR 3*2>(0+5+974-974) --
pHqghUme
-1 OR 2+472-472-1=0+0+0+1
pHqghUme
-1 OR 3+472-472-1=0+0+0+1
pHqghUme
-1 OR 3*2<(0+5+472-472)
pHqghUme
-1 OR 3*2>(0+5+472-472)
pHqghUme
-1' OR 2+694-694-1=0+0+0+1 --
pHqghUme
-1' OR 3+694-694-1=0+0+0+1 --
pHqghUme
-1' OR 3*2<(0+5+694-694) --
pHqghUme
-1' OR 3*2>(0+5+694-694) --
pHqghUme
-1' OR 2+163-163-1=0+0+0+1 or 'GhTOFVbB'='
pHqghUme
-1' OR 3+163-163-1=0+0+0+1 or 'GhTOFVbB'='
pHqghUme
-1' OR 3*2<(0+5+163-163) or 'GhTOFVbB'='
pHqghUme
-1' OR 3*2>(0+5+163-163) or 'GhTOFVbB'='
pHqghUme
-1" OR 2+45-45-1=0+0+0+1 --
pHqghUme
-1" OR 3+45-45-1=0+0+0+1 --
pHqghUme
-1" OR 3*2<(0+5+45-45) --
pHqghUme
-1" OR 3*2>(0+5+45-45) --
pHqghUme
if(now()=sysdate(),sleep(15),0)
pHqghUme
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
pHqghUme
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
pHqghUme
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
pHqghUme
-1; waitfor delay '0:0:15' --
pHqghUme
-1); waitfor delay '0:0:15' --
pHqghUme
1 waitfor delay '0:0:15' --
pHqghUme
EM65IGju'; waitfor delay '0:0:15' --
pHqghUme
-5 OR 688=(SELECT 688 FROM PG_SLEEP(15))--
pHqghUme
-5) OR 347=(SELECT 347 FROM PG_SLEEP(15))--
pHqghUme
-1)) OR 959=(SELECT 959 FROM PG_SLEEP(15))--
pHqghUme
rOzsV67F' OR 318=(SELECT 318 FROM PG_SLEEP(15))--
pHqghUme
WVOpYuQT') OR 241=(SELECT 241 FROM PG_SLEEP(15))--
pHqghUme
1D8oPfGs')) OR 97=(SELECT 97 FROM PG_SLEEP(15))--
pHqghUme
555*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
pHqghUme
555'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'