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

SQL 20 Programs Two Databases

The document outlines 20 SQL programs that utilize two databases: EmployeeDB and SalesDB. It includes commands for creating databases and tables, inserting records, querying data, and performing operations like updates and joins. The programs demonstrate various SQL functionalities such as aggregation, filtering, and grouping data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

SQL 20 Programs Two Databases

The document outlines 20 SQL programs that utilize two databases: EmployeeDB and SalesDB. It includes commands for creating databases and tables, inserting records, querying data, and performing operations like updates and joins. The programs demonstrate various SQL functionalities such as aggregation, filtering, and grouping data.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

20 SQL Programs Using Two Databases

Database 1: EmployeeDB
1. CREATE DATABASE EmployeeDB;
2. USE EmployeeDB;
3. CREATE TABLE Employees (...);
4. INSERT records into Employees;
5. SELECT all employees;
6. SELECT employees with salary > 50000;
7. GROUP BY department;
8. MAX salary query;
9. UPDATE salary;
10. DELETE old records;

Database 2: SalesDB
11. CREATE DATABASE SalesDB;
12. USE SalesDB;
13. CREATE Customers table;
14. CREATE Orders table;
15. INSERT customers;
16. INSERT orders;
17. SUM of sales;
18. COUNT orders per customer;
19. HAVING clause;
20. JOIN Customers and Orders;

You might also like