[go: up one dir, main page]

0% found this document useful (0 votes)
10 views1 page

Class 12 Ip Worksheet 1 SQL Table

The document outlines a series of SQL operations to manage a PRODUCTS table, including creating the table with constraints, inserting and updating product data, and retrieving information based on various criteria. Key tasks include updating prices, deleting specific products, and displaying product details in different formats. The document also emphasizes sorting and filtering products based on price and quantity, as well as aggregating data by company.

Uploaded by

uma divan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Class 12 Ip Worksheet 1 SQL Table

The document outlines a series of SQL operations to manage a PRODUCTS table, including creating the table with constraints, inserting and updating product data, and retrieving information based on various criteria. Key tasks include updating prices, deleting specific products, and displaying product details in different formats. The document also emphasizes sorting and filtering products based on price and quantity, as well as aggregating data by company.

Uploaded by

uma divan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

PRODUCTS

1 Create the above table products


add constraints Pid -primary key,Qty default 10,Company not null
2 Insert a new product
3 Update the price of all the product by 2%
4 Increase the price of the product 105 by 4000
5 Display the structure of the table
6 Update the company name of a1 to sony
7 Delete the product where PID = 110 from the PRODUCTS table.
8 Retrieve all products from the PRODUCTS table.
9 Display only the PNAME and PRICE of all products.
10 Show all products where PRICE is greater than 10,000.
11 Retrieve all products where QTY is between 10 and 50.
12 Find all products ordered in the year 2023.
13 Retrieve all products sorted by PRICE in descending order.
14 Display PNAME, PRICE, and a new column Discounted_Price
(90% of the original price) using aliasing (AS).
15 Show the total number of products available in the PRODUCTS table.
16 Find products with price range 10000 and 20000
17 Display the products in ascending order of company name
18 Display the name of companies without repetition
19 Display the pname price and company of prodcut 101,105,108
20 Display the maximum price of products of each company

You might also like