Вы находитесь на странице: 1из 3

DBMS ASSIGNMENT

Question 1: Provide the create table syntax to Create a Table Employee whose details are as below. Employee(EmployeeID, Last ame, !irst ame, "ddress, Date#ired$ Ans: create Employee(EmployeeID int(%$, Last ame varchar(&'$,!irtst ame varchar(&'$, "ddress varchar(('$, Date#ired date$) Question 2: Provide the I *E+T ,-ery to be -sed in Employee Table to .ill the Details. Ans: a$ insert into Employee val-es (/,0sin1h0,0Deepa20,02ol2ata0,0&34'54&'/&0$) b$ insert into Employee val-es (&,0chowdh-ry0,0Indradeep0,0Chennai0,0&64'54&'/&0$) Question 3: 7hen we 1ive *ELECT 8 !+9: E:PL9;EE .#ow does it +espond< "ns: 7hen we type the following query of select * from employee it returns all the data present that is all the columns in employee table. In this case it shows the above values in the insert statement. Question 4: Create a Table CLIE T whose details are as below. Client(ClientID, Last ame, !irst ame, =alance, EmployeeID$ Ans: create Client(ClientID int(%$, Last ame varchar(&'$,!irtst ame varchar(&'$, =alance .loat(/'$, EmployeeID int(%$, EmployeeID foreign key references Employee(EmployeeID $) Question 5: Provide the I *E+T ,-ery to be -sed in CLIE T Table to .ill the Details. Ans: insert into Client val-es (!lientID,"ast#ame,$irst#ame,%ddress, EmployeeId &alues
(', ,(singh(,(Deepak(,(kolkata(,) *

Question 6: 7hen we 1ive *ELECT 8 !+9: CLIE T .#ow does it +espond< Ans: Displays all the attrib-es with its val-e. It ret-rns all the rows and col-mns present in the client table, that is it shows all the .ield data o. client table Question 7: Choose the correct answer. The *>L command to create a table is: a. :a2e Table b. "lter Table c. De.ine Table d. Create Table "ns: d. Question 8: Choose the correct answer. The D+9P T"=LE statement: a. deletes the table str-ct-re only b. deletes the table str-ct-re alon1 with the table data c. wor2s whether or not re.erential inte1rity constraints wo-ld be violated d. is not an *>L statement "ns: b.

Question 9: 7hat are the di..erent data types available in *>L server< "ns: The di..erent data types are inte1er,n-mber(p,d$,character(n$,varchar(n$, date, time, timestamp, smallint, .loat(n$,=inary.

Question 10: Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables? Ans: + DD"( Data Deifinition "anguage .
Question 11: 7hat operator per.orms pattern matchin1< "ns: LI?E operator Question 12: 7hat operator tests col-mn .or the absence o. data< "ns: I* @LL operator

Question 13: Which command executes the contents of a specified file? Ans: ,-%.- or / command.
Question 14: 7hat is the parameter s-bstit-tion symbol -sed with I *E+T I T9 command< "ns: 010 commonly known as ampersand operator. Question 15: 7hich command displays the *>L command in the *>L b-..er, and then exec-tes it< "ns: +@ Question 16: 7hat are the wildcards -sed .or pattern matchin1< "ns: A and B A .or sin1le character s-bstit-tion . B .or m-ltiple character s-bstit-tion Question 17: *tate whether tr-e or .alse. ECI*T*, *9:E, " ; are operators in *>L. "ns: T+@E Question 18: *tate whether tr-e or .alse. DE, FG, HE all denote the same operation. "ns: T+@E Question 19: 7hat are the privile1es that can be 1ranted on a table by a -ser to others< "ns: Insert, update, delete, select, references, inde2, e2ecute, alter, all Question 20: 7hat command is -sed to 1et bac2 the privile1es o..ered by the I+" T command< "ns: +EJ9?E Question 21: 7hich system tables contain in.ormation on privile1es 1ranted and privile1es obtained< "ns: 3,E.4-%546.I&,47%DE, 3,E.4-%546.I&,4.E!D

Question 22: Which system table contains information on constraints on all the tables created?
"ns: 3,E.4!8#,-.%I#-,

Question 23: 7hat is the di..erence between T+@ C"TE and DELETE commands< "ns: '.Delete is a D7" command and -runcate is a DD" command.
).9here clause can be used with delete only. :. Delete operation can be rolled back, -runcate operation cant be rolled back again that is it is a permanent delete.

Question 24: 7hat command is -sed to create a table by copyin1 the str-ct-re o. another table< "ns: + !.E%-E -%5"E .. %, ,E"E!- command
E2planation + -o copy only the structure, the 9;E.E clause of the ,E"E!- command should contain a $%",E statement as in the following. !.E%-E -%5"E #E9-%5"E %, ,E"E!- * $.87 E<I,-I#=-%5"E 9;E.E '>)* If the 9;E.E condition is true, then all the rows or rows satisfying the condition will be copied to the new table.

Вам также может понравиться