100%(1)100% found this document useful (1 vote) 392 views4 pagesRDBMS DDL Post
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
€
ww Dashbosrd / AppDev / Stage-1/ ROB
Data Defi
Quiz review
‘Started on Thursday 12 October 2023, 101 AM.
State Fished
Completed on Thursday, 12 October 2028, 1:03 AM
Time taken 1 min 28 sees
Marks 9.00/9.00
Grade 100.00 out of 100.00
Feedback Congratultionsi! You have passed by eecuting mote than 805,
Question 1
‘Tom, the administrator should create the table"CSR Registration” with the following les
‘+ Whenever a row in the CSR_Student table is deleted, the row from the CSR Registration must be deleted
‘+ When deleting the row from the CSR_course table ink column of the CSR registration must be made to null
| csmpecistemon
mee ene nae
Drag and drop the correct keyword for the below given query.
create table CSR reistration(courseid number(4) references [Link](courseid’ @R) \delete set null Jv studid number(4)
references CSR studenstudi)(_on delete cascade | at);Question 2
Wich ofthe folowing options is not correct?
Select one
2, alter table emp add colurnn_name vachar(28)
alter table emp medty name varcha(30),
alter table emp drop column column name
4. alter table mp drop column name;
‘The correct answer; ats tale emp-dr6p olurnn_name
Question 3
‘We need to ensure that the amount withdrawn should be less then the eredit card limit amount, to ensure this integrity what type
constraint willbe used?
Select one
column evel check constraint
. table level check constraint¥
© table level foreign key constraint
column level foreign key constraint
‘Your answer's core.
‘The correct answers table level check constaint
Question 4
‘An emp table contains
1s emplay name, desig and salary. How do you drop column salary?
Select one
1. altertableemp drop column salary
delete from emp winere clu
alter table emp delete column salary:
4
alan
‘The correct answers: alter table emp drop column salary,Question 5
How would you add a foreign key constraint on the dept_no column in the EMP table, referring to the id column in the DEPT table?
Select one
‘Use the ALTER TABLE command with the MODIFY clause on the EMP table.
. Use the ALTER TABLE command with the MODIFY clause on the DEPT table.
© Use the ALTER TABLE command with the ADD clause on the EMP table. ¥
4. This task cannot be accomplished
© Use the ALTER TABLE command with the MODIFY clause on the EMP table.
‘Your answer's cores.
‘The correct answer is: Use the ALTER TABLE command withthe ADD clause on the EMP table
Question 6
Choose the correct options, __ command is used to delete the records and _ command is used to delete the db
objects?
Truncate , Drop¥_
Truncate, Delete
Delete , Truncate
Drop ;Truncate
‘Your answer's correct
‘The correct answer ie
Truncate , Drop
Question 7
‘table consists of ___ primarykeys
Select one
Any number
b 2
aw
‘The correct answeris:1Question 8
Merk oncat 100
‘Choose the correct option
‘cardholderphoneno unique ’
ccardholdername rot null v
crediteardne primary key
validitydate rot null v
creditcarctype should be silver orplatinum only check v
‘Your answer's core.
‘The cotrect answers cardholderphoneno + unique, cardholdemame -»not nul creditcard» primary key valiydate-+ nt nul,
crediteardiype shoule be silver a platinum only -» check
Try out
Jump to
Pro-uiz >