NEW
Font size
WorksheetsICT EXAM — Worksheet Questions
Total questions: 23
Worksheet time: 12mins
Calculate the total marks from student table /1mark. Use the STUDENT TABLE shown with columns: Student_id, Names, sex, Class, Age, Marks /100, Address.
Select sum (mark) from student;
Select Total(mark) from student;
Select Total (marks) from student;
Select sum (marks) from student;
Display the student who have maximum ages /1mark. Refer to the STUDENT TABLE.
SELECT MAX (age) from students;
SELECT MAX (age) from student table
SELECT MAXIMUM (age) from student
None above
Modify the class of S6MEG to S6MPG from student_id:001 /2marks.
UPDATE Student SET class = 'S6MPG' WHERE Student_id= 001;
UPDATE Student SET class = "S6MPG" WHERES Student_id= 001;
UPDATE Student SET class = "S6MPG" WHERE student-id= “001”;
UPDATE Student SET class = "S6MPG" WHERE Student-id=” 001”;
UPDATE Student SET class = "S6MPG" WHERE Student_id= 001;
Which best statement used to display the students who have at least half of marks /2mark.
SELECT * FROM student WHERE MARKS >=50;
SELECT * FROM students WHERE MARKS >='50';
SELECT * FROM student WHERES MARK >'50';
SELECT * FROM students WHERE MARKS >='50';
SELECT StrComp("Rutsiro", "Gasabo"); /1mark
1
-1
0
None above
Describe the best function used to converted from "RWANDA" to "rwanda" case: /1mark
Lowecase ( )
Lowecase ( )
None above
SELECT Len("RWANDA NZIZA"); Which the best answers: /2 marks
11
12
13
SELECT LEFT("RWANDA NZIZA",8); Which the best answers: /1mark
RWANDANZ
RWANDANZI
RWANDAN
RWANDANZIZ
The column that uniquely identifies each row in a table is called: /1mark
Foreign key
Unique field
Primary key
Composite key
Which SQL statement is used to add data into a table? /1mark
INSERT INTO
UPDATE
APPEND
ADD RECORD
A foreign key is used to: /1mark
Identify records in a table
Link tables together
Sort data
Store only numbers
Which database model stores data in tables consisting of rows and columns? /1mark
Hierarchical
Relational
Network
Object-oriented
In the relational model, a tuple is: /1mark
A column
A field
A row
A table
The graphical representation of entities and their relationships is known as: /1mark
ERD
DFD
Flowchart
UML
Which statement is used to create a table? /1mark
CREATE
CREATE TABLE
CREATE TABLES
UPDATE
Which SQL statement removes an entire table? /1mark
DELETE TABLE
ERASE TABLE
REMOVE TABLE
DROP TABLE
Which part of SQL is used to change the structure of a table? /1mark
DDL
DML
DCL
RDBMS
GRANT and REVOKE commands belong to: /1mark
DDL
DML
TCL
None Above
SELECT DISTINCT is used to: /1mark
Delete duplicate rows
Prevent NULL values
Return unique values only
None above
Which operator is used in WHERE clause to combine conditions? /1mark
WHERE
AND
LIKE
NONE ABOVE
The ALTER TABLE statement can add or drop columns. True / False /2 marks
True
False
DROP TABLE removes only data but keeps the table structure. True / False /2 marks
True
False
SQL is case sensitive when writing commands. True / False /2 marks
True
False
