Informatics Practices

Write SQL queries to perform the following based on the table Product having fields as (prod_id, prod_name, quantity, unit_rate, price, city)

(a) Display those records from table Product where prod_id is more than 100.

(b) List records from table Product where prod_name is 'Almirah'.

(c) List all those records whose price is between 200 and 500.

(d) Display the product names whose quantity is not given.

(e) Show the detailed records in the table Product.

Relational Database

3 Likes

Answer

(a)

SELECT * FROM PRODUCT
WHERE prod_id > 100;

(b)

SELECT * FROM PRODUCT
WHERE prod_name = 'Almirah';

(c)

SELECT * FROM PRODUCT
WHERE price BETWEEN 200 AND 500; 

(d)

SELECT prod_name
FROM PRODUCT
WHERE quantity IS NULL;

(e)

SELECT * FROM PRODUCT;

Answered By

1 Like


Related Questions