SQL commands for XII class Practical
1. How do you create a new database in SQL?
2. How can you delete an existing database?
3. How do you select a specific database to use?
4. How can you list all databases on the server?
5. How can you create a new table in SQL?
6. How do you delete a table in SQL?
7. How can you add a new column to an existing table?
8. How do you delete a column from a table?
9. How can you rename a column in SQL?
10. How can you change the data type of an existing column?
11. How do you insert data into a table?
12. How can you insert data into specific columns of a table?
13. How do you update existing data in a table?
14. How do you delete data from a table?
15. How can you truncate all data in a table?
16. How do you select all columns from a table?
17. How do you select specific columns from a table?
18. How can you filter records based on a condition?
19. How can you sort results in ascending or descending order?
20. How do you group records by a specific column?
21. How can you use aggregate functions like SUM, AVG, MAX, and MIN?
22. How do you retrieve unique values from a column?
23. How do you filter joined tables with specific conditions?
24. How can you check for NULL values in a column?
25. How do you replace NULL values in a column with another value?
26. How can you count the number of rows in a table?
27. How do you find the highest value in a column?
28. How can you find the lowest value in a column?
29. How do you find the average value in a column?
30. How can you calculate the sum of a column’s values?
31. How do you use a WHERE clause with aggregate functions?
32. How can you use HAVING to filter groups in SQL?
33. How can you define a primary key on a table?
34. How do you ensure a column cannot contain NULL values?
35. How can you set a column as the primary key in a table?
36. How do you enforce unique values in a column?
37. How can you set a default value for a column?
38. How do you modify an existing column to NOT NULL?
39. How can you change a column to allow NULL values?
40. How do you add a default value to an existing column?
41. How do you use a CROSS JOIN to combine all records from two tables, and how can you apply a
condition to filter the results?
42. How can you use a NATURAL JOIN to join tables based on columns with the same name, and how can you
filter the results with additional conditions?
43. How do you use an EQUI JOIN to join tables based on a specific equality condition and apply additional
conditions to further filter the results?
44. ORDER By to display data in ascending / descending order
45. GROUP BY and find the min, max, sum, count and average
46. Create a Python MYSQL connectivity application (Using While True) which can perform following
operations:
(a) update record (b)search record (c)insert record (d)Delete record (e)create table
(f) display record