This document contains instructions for SQL assignments involving creating a database and table, inserting records, and writing queries. It asks the student to:
1. Create a database named MYORG and table named Emp with columns for employee number, name, job, hire date, salary, and commission.
2. Insert a sample record into the Emp table.
3. Write queries to display all records, employees earning over 2200, those without commission, names and salaries not between 2500-4000, and more.
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 ratings0% found this document useful (0 votes)
17 views
CS Assignments 1
This document contains instructions for SQL assignments involving creating a database and table, inserting records, and writing queries. It asks the student to:
1. Create a database named MYORG and table named Emp with columns for employee number, name, job, hire date, salary, and commission.
2. Insert a sample record into the Emp table.
3. Write queries to display all records, employees earning over 2200, those without commission, names and salaries not between 2500-4000, and more.
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
You are on page 1/ 3
CS Assignments 1
3. Write a function bubble_sort (Ar) in python, Which accepts a list Ar of
numbers sort it in ascending order using Bubble sort Method. 4. Write a function Binary_Search (Arr, N) in python to search an element N in list of numbers Arr using binary search method. CS Assignments 2 CS Assignments 3 1 Create a Database named MYORG. 2 Open the Database with USE command. 3 Create a table name Emp with following structure.
empno ename job hiredate sal comm
Number Varchar Char(10) Date Number Number 4 Insert the following Records-
empno ename job hiredate sal comm
8369 SMITH CLERK 1990-12-18 800.00 NULL 5 Write a query to display all the records with all the columns. 6 Write a query to display EName and Sal of employees whose salary are greater than or equal to 2200 7 Write a query to display details of employs who are not getting commission. 8 Write a query to display employee name and salary of those employees who don’t have their salary in range of 2500 to 4000. 9 Write a query to display the name of employee whose name contains “A” as third alphabet in Ascending order of employee names. 10 Write a query to display the ename and sal with 50% of sal as DA. 11 Write a query to display the name of employee whose name contains”M” as First and “L” as third alphabet. 12 Write a query to display details of employs with the text “Not given”, if commission is null. 13 Display the distinct job titles offered by the Organization. 14 Display the Names of employees who are working as Manager or Analyst. 15 Display the names of employees who joined the organization on or after 01/05/1991.