Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

Kingdom of Saudi Arabia ‫المملكة العربية السعودية‬

Ministry of Higher Education ‫وزارة التعليم العالى‬


Jazan University ‫جــامـعــة جـــــازان‬
College of Computer Science and Information ‫كلية الحاسب اآللى ونظم المعلومات‬
Technology Academic Year-2022 | First Semester

INTERNAL LAB EXAM ( SET – A)

1) Create the following table with the name stu19 : (2 Marks)

Field Data type Constraint


Sid Number(4) Primary key
Sname Varchar(20)
course char(15)

2) Insert the following values into the above table: ( 2 M)


Sid Sname Course
12 sana Eng
13 Maha Math
11 Neha Eng
14 Ala Computers
13 ali Eng

3.

(i)Identify which row is violating the primary key constraint.(1M)

(ii)Add a new column “Marks” by using alter table command. (1M)

(iii)Select all the columns from the stud19 table where sid>14. (1 M)

(iv)Display all the records from stud19 table order by sid. (1 M)

(v)Update stud19 and set Marks=90 for sid=12 by using the where clause .(1M)

(vi ) Delete the record with ‘sid= 12’ from the stud19 table. (1 M)

1 (A)

You might also like