View the Exhibit and examine the data in the PRODUCT_INFORMATION table.
There are some products listed in the PRODUCT_INFORMATION table that have no value in the LIST_PRICE column. You issued the following SQL statement to find out the PRODUCT_NAME for these products:
SELECT product_name, list_price
FROM product_information
WHERE list_price = NULL;
The query returns no rows.
What changes would you make in the statement to get the desired result?
A.
Change the WHERE clause to WHERE list_price = 0
B.
Change the WHERE clause to WHERE list_price = ‘ ‘.
C.
Change the WHERE clause to WHERE list_price IS NULL.
D.
In the WHERE clause, enclose NULL within single quotation marks.
E.
In the WHERE clause, enclose NULL within double quotation marks.
select * from employees where commission_pct is null
select * from employees where commission_pct = null
PLS Send me What is the diff between of these, bcaus i m so confuse in these.
regards
Guddu Kumar Ray
null is not a value
so it is difficult to identify to use with operator
so use is null or is not null
A null is a value that is unavailable, unassigned, unknown or inapplicable. Null is not same as zero or blank space. Zero is a number and blank space is a character. Columns of any data type can contain null values. For Null values you use the conditions like mentioned above.
select sal from emp
where sal != null;
select sal from emp
where sal < (select avg(sal) from emp);
select sal from emp
having sal < (select avg(sal) from emp group by job);
Correct ANS = C
C
C