WorksheetsAdvanced Database
Total questions: 15
Worksheet time: 9mins
update guirreRose set guirre_strand = 'TVL' where deptno = 30;
This is rejected, why is it rejected?
Dept is not a key preserved base table.
Because there is an aggregation function
There is a check option.
SQL> create view guirreRose as
2 select empno, ename, sal, comm, dept.deptno, dname, loc
3 from emp, dept
4 where emp.deptno = dept.deptno;
View created.
The user then runs:
update guirreRose set loc = 'CASHEL' where deptno = 30;
Is the command accepted or rejected?
Accepted
Rejected
SQL> create view guirreRose as
2 select empno, ename, sal, comm, dept.deptno, dname, loc
3 from emp, dept
4 where emp.deptno = dept.deptno;
View created.
The user then runs:
update guirreRose set ename = 'ROSE' where empno = 7934;
Is this accepted or rejected?
Accepted
Rejected
Trigger is invoked before/after data row is:
deleted
updated
inserted
all answers are correct
Which of the following is the correct command to create a view?
CREATE VIEW guirreRose AS
SELECT VIEW guirreRose FROM
CREATE TABLE VIEW guirreRose AS
CREATE VIEW TABLE guirreRose FROM
CREATE FUNCTION totalPaidByCust(custID INT)
........
END
If you want to query the function, the command will be:
Given the syntax below what is the attribute name:
CREATE TABLE guirreRose. guirre_BSIS (guirre_Score INT (3) NOT NULL), ENGINE=INNODB;
guirreRose
guirre_BSIS
guirre_Score
Given the syntax below, its accepted or rejected?
ALTER TABLE dbName. table_name CHANGE ATTRIB NAME (original guirre_attrib_name new_guirre_attrib_name DATATYPE (DATA LENGTH) NULL), ENGINE=INNODB;
Accepted
Rejected
What is the codes of the output above:
INSERT INTO guirreRose.guirreCampus`
(`guirre_bpc_campus`,` guirre_course`, `guirre_year`, `guirre_section`) VALUES ('ANGAT', 'COMSEC','2','A')
CREATE guirreRose.guirreCampus`(`guirre_bpc_campus`,
` guirre_course`, `guirre_year`, `guirre_section`) VALUES ('ANGAT', 'COMSEC','2','A')
UPDATE guirreRose.guirreCampus`(`guirre_bpc_campus`,
` guirre_course`, `guirre_year`, `guirre_section`) VALUES ('ANGAT', 'COMSEC','2','A')
ALTER guirreRose.guirreCampus`(`guirre_bpc_campus`,
` guirre_course`, `guirre_year`, `guirre_section`) VALUES ('ANGAT', 'COMSEC','2','A')
Identify the attribute/s from the codes below:
UPDATE `college_applications` SET
`year` = '2' WHERE
`college_applications`.`id` = 0519;
year
id
year and id
college applications
ALTER TABLE guirreRose. guirre_bsis CHANGE guirre_sec (guirre_sec new_guirre_section VARCHAR (1) NOT NULL) ENGINE=INNODB;
What would be the new attribute name?
guirreRose
guirre_bsis
guirre_sec
guirre_section
Data Definition Language
Insert, Update, Delete, Select
Insert, Create, Delete, Select
Create, Alter, Drop, Truncate
Insert, Alter, Drop, Truncate
Data Manipulation Language (DML)
Insert
Update
Create
Select
Truncate
