You are on page 1of 5

DBMS WORKSHEET 1

Worksheet 1

Student Name: Ayush Pandey UID: 21BCS6143


Branch: CSE AIML - 5 Section/Group: B
Semester: 3rd Subject Name: DBMS

Q1. Create an employee table with fields as – empno, ename, job, mgr, hiredate sal, comm,
deptno.

Solution:

Q2. Insert 20 rows in the table.


Solution:
BEFARTME9T0F NAAC A«
GRADE¥*WI•
ACCREDITED UNIVERSITY
Discover. Learn. Empower.

uysql› inseiinto employee values(8, "Dai’pan", "Salesman", 6, "1998-11-20", 35000, 1200, 3J;
Query 0k, 1 row affetecl C0 . 01 se c
uysql› inseiinto employee values(9, "Ekansh", "Softie Developer", 2, "2001—02—27", 32000, 2000, U;
Query 0k, 1 row affected Cé. 00 sect

values(l0, "Evak", "Advei’tise+ent Desis nei", 11, "1999-01-01", 30000, 2000, 5J;
00 secJ

way s qt > t ns et•t i nI o eM\ pt oy e e values(ll, "Gii•ik", "Design )lanas er", NULL, "1998-01-02", UOOOO, 3000, 5J ;
Q ue ry 0 R , l ro›'i affe ct eel ( 0 00 sec)

vat ite s 1 2, "Ht•ecl haan " , "Sat e silk an " , b , " 20 0 1—02—03 " , 3 0 0 0 0 , 10 0 0 , 3 ;
Q ue ry 0 R , l ro›'i at—I— e ct eel ( 0 0 0 s e c

way s qt > i ns et"t i nI o eM\ pt oy e e vat we s


"Hep a•g " , "CEO" , NULL , " 98 8— Oh—2 9 " , 15 0 0 0 0 , NULL , 1} '
( 13,
.00sec
uysql› inseiinto employee vat we s ( 15 , "I ne sh " , "COO" , NULL , " 198 9-05-20 " , 1 0 0 0 0 0 , NULL , I}
;
Query 0k, 1 row af<cted C0 . 0 0 s e c
vat. we s 15,"I s haan " , "TI°acl e f'1anag eI°" , NULL , " 19 9 9—01— 02 " , 9 0 0 0 0 , N U LL , 7} ;
.00sec

il\y s qt > i ns e •t i nt o eili pt o y e e values(16, "Jaii-aj", "Sales Assistant Managers", 6, "1999-09-09", 50000, NULL, 3);
. 00 secJ

il\y s qt > i ns e •t i nt o eili pt o y e e values(17, "Lekh", "Salesman", 6, "1999-09-08", 35000, 1200, 3J ;

il\y s qt > i ns e •t i nt o eili pt o y e e values(18, "Jihan", "Softviai•e Developers", 2, "2000-10-20", 32000, 2000, UJ ;

il\y s qt > i ns e •t i nt o eili pt o y e e values(19, "Lohit", "Database Developer", 5, "1987-09-09", 40000, 3000, 2J;

mysql› insei’t into employee values(20, "Manbii’""Database User’ Manaser", 5, "1999-09-07"41000, 30002);
Q3. Display employee name and salary of employees having salary greater than 25000.
Solution:
Q4. Display details of employee who aren’t getting commission.

Solution:

Q5. Display names of employees whose first name starts with alphabet ‘A’.
Solution:

You might also like