How many rows are returned?

You have the following table definition:
CREATE TABLE Product (ID INTEGER PRIMARY KEY, Name VARCHAR(20), Quantity INTEGER)
The Product table contains the following data.

You execute the following statement:
SELECT Name FROM Product WHERE Quantity IS NOT NULL
How many rows are returned?

You have the following table definition:
CREATE TABLE Product (ID INTEGER PRIMARY KEY, Name VARCHAR(20), Quantity INTEGER)
The Product table contains the following data.

You execute the following statement:
SELECT Name FROM Product WHERE Quantity IS NOT NULL
How many rows are returned?

A.
0

B.
1

C.
2

D.
3

E.
4



Leave a Reply 4

Your email address will not be published. Required fields are marked *


Sven

Sven

The values 33, 29 and 0 are all not NULL.

Ranajoy Roy

Ranajoy Roy

The answer should be 4,Option E.. because not null scan those columns where the value is NULL in the column but if the column value is blank not null will not consider it as a NULL value,thus it will return all values..

Franco

Franco

But, as it is an integer there are no blanks on integer types

Amit

Amit

It will return 3 not 4. The answer is D