Ch 28: Basic SQL SELECT Queries

16 Questions16 MCQs0 Short Questions0 Long Questions
๐ŸŽฏ Exam Practice Papers
SEMESTER PASS

CS403 - Database Management Systems Examination Practice

Timed practice exam simulation for CS403 - Database Management Systems.

๐Ÿ“˜ VU MID TERM EXAMLectures 1 to 22
โฑ๏ธ 60 Mins

Mid Term Examination

Covers syllabus of Lectures 1 to 22 with 30 high-yield MCQs in a timed exam environment.

๐Ÿ“30 MCQs
โฑ๏ธ60 Minutes
๐Ÿ“— VU FINAL TERM EXAMLectures 23 to 45
โฑ๏ธ 90 Mins

Final Term Examination

Comprehensive semester exam preparation with 45 MCQs covering Lectures 23 to 45 with complete course coverage.

๐Ÿ“45 MCQs
โฑ๏ธ90 Minutes
Showing 1 โ€“ 10 of 16 Questions
Page 1 of 2
Q1
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.2. Select StatementEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following clauses, keywords, or constraints is NOT related to or a part of the basic SQL SELECT statement structure?
๐Ÿ’ป sql Snippet
SELECT stId, stName FROM Student WHERE cgpa >= 3.0;
  1. A.SELECT
  2. B.NOT NULL
  3. C.WHERE
  4. D.FROM
Q2
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.2. Select StatementEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following statements is true regarding the use of the DISTINCT keyword in a SQL SELECT statement?
๐Ÿ’ป sql Snippet
SELECT DISTINCT prName FROM student;
  1. A.It is used with DDL commands to enforce unique constraints during table creation
  2. B.It removes duplicate values from the query result set output
  3. C.It permanently deletes duplicate columns from the physical table schema
  4. D.It forces columns to reject NULL values during database insertion
Q3
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.1. Insert Statement SyntaxEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The INSERT INTO statement in SQL is used to enter values into which of the following column scopes by default when the column list is omitted?
๐Ÿ’ป sql Snippet
INSERT INTO course 
VALUES ('CS-211', 'Operating Systems', 4, 'MCS');
  1. A.Not null columns only
  2. B.Only a particular column
  3. C.All columns
  4. D.Key value columns only
Q4
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.1. Insert Statement SyntaxEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following SQL Data Manipulation Language statements represents the correct syntactical structure for inserting values into explicit columns of an 'employee' table?
๐Ÿ’ป sql Snippet
INSERT into employee (col1, col2, col3) VALUES (val1, val2, val3)
  1. A.INSERT into employee COLUMN (col1, col2, col3) VALUES (val1, val2, val3)
  2. B.INSERT into (col1, col2, col3) VALUES (val1, val2, val3)
  3. C.INSERT into employee (col1, col2, col3), (val1, val2, val3)
  4. D.INSERT into employee (col1, col2, col3) VALUES (val1, val2, val3)
Q5
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.2. Select StatementEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following clauses, keywords, or constraints is NOT a part of the basic SQL SELECT statement structure?
๐Ÿ’ป sql Snippet
SELECT stId, stName 
FROM student 
WHERE cgpa >= 3.0;
  1. A.WHERE
  2. B.SELECT
  3. C.NOT NULL
  4. D.FROM
Q6
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.1. Insert Statement SyntaxEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following SQL Data Manipulation Language (DML) statements is standardly used to insert and enter values into table columns?
๐Ÿ’ป sql Snippet
INSERT INTO course 
VALUES ('CS-211', 'Operating Systems', 4, 'MCS');
  1. A.ENTER INTO
  2. B.INSERT TOP
  3. C.PUT INTO
  4. D.INSERT INTO
Q7
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.3. Selecting All Columns (SELECT *)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
What will be the precise output of executing the SQL statement 'SELECT * FROM student;' on a relational database table?
๐Ÿ’ป sql Snippet
SELECT * FROM student;
  1. A.Display only the row values of the student table without their column headers
  2. B.Display only the column names and metadata of the student table
  3. C.Display all the column headers without retrieving any individual row instances
  4. D.Display all rows and all columns of the student table
Q8
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.1. Insert Statement SyntaxEasy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
The INSERT INTO statement in SQL is used to enter values into which of the following column scopes by default when the target column list is omitted?
๐Ÿ’ป sql Snippet
INSERT INTO course VALUES ('CS-211', 'Operating Systems', 4, 'MCS');
  1. A.Only particular column
  2. B.All columns
  3. C.Not null columns only
  4. D.Key value columns only
Q9
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.3. Selecting All Columns (SELECT *)Easy๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
Which of the following SQL queries retrieves all fields (columns) and rows from an employee table named 'EMP'?
๐Ÿ’ป sql Snippet
SELECT * from EMP;
  1. A.SELECT * from EMP;
  2. B.SELECT emp* from EMP'
  3. C.SELECT emp_id where EMP;
  4. D.SELECT * where EMP;
Q10
โ“ MCQ๐Ÿ“˜ CS403๐Ÿ“‘ Lec 28๐Ÿท๏ธ 28.2. Select StatementMedium๐Ÿ”โญ๐Ÿ’ก๐Ÿ“„๐ŸŽ“VU๐Ÿ›๏ธVU
You are working with a 'STUDENT' table defined with the attributes: 'stId', 'stName', 'stPhone', 'cgpa', and 'stAdr' (address). Write the most efficient and recommended SQL query to retrieve and display all column values of the student table EXCEPT the address ('stAdr') column.
๐Ÿ’ป sql Snippet
SELECT stId, stName, stPhone, cgpa FROM STUDENT;
  1. A.SELECT stId, stName, stPhone, cgpa FROM STUDENT;
  2. B.SELECT * EXCEPT stAdr FROM STUDENT;
  3. C.SELECT ALL - stAdr FROM STUDENT;
  4. D.SELECT stId, stName, stPhone, cgpa,!stAdr FROM STUDENT;