0% found this document useful (0 votes)
15 views

MySQL Queries

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

MySQL Queries

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

SQL Queries

Create the following table and execute the following queries:


i. To create Database STD12
ii. To create table PRODUCT and CLIENT
iii. To insert values in the table Product and Client as given.
iv. To display the details of the table PRODUCT and table CLIENT

O/P:

v. To display C_ID, BrandName, P_ID and ProductName form table PRODUCT and CLIENT
O/P:

vi. To display the details of Products whose Price is in the range of 50 to 100(Both values
included).

O/P:

vii. To display the ClientName, City from table Client, and ProductName and Price from
table Product, with their corresponding matching P_ID.
O/P:

viii. To increase the Price of all Products by 10

O/P:

ix. To display sum of all price from table CLIENT.

O/P:
x. To display maximum price of Face Wash from the table CLIENT

O/P:

xi. To add a new column quantity in the table CLIENT.

O/P:
xii. To display BrandName of PRODUCT that begins with MA.

O/P:

xiii. To display the details of table PRODUCT in order of BrandName.


O/P:

xiv. To display the count of manufactures from the table CLIENT.

O/P:

xv. To display ProductName of manufacturer having price > 50.


O/P:

xvi. To delete the records from table CLIENT whose price is less than 45.

O/P:

xvii. To drop table product.

O/P:
Python Interface with MYSQL
23. Write a python database connectivity script that creates and inserts value into
the table SCHOOLBUS of database STD12.

O/P:

24. Write a python database connectivity script that display the records of table

SCHOOLBUS where distance is greater than 20.


O/P:

25. Write a python database connectivity script to increase the charges by 100

O/P:
26. Write a python database connectivity script that deletes records from the table SCHOOLBUS
that have name =”Yadhav Co”.
O/P:

You might also like