Refer to CUET Computer Science MCQs Chapter 1 Database Query using SQL provided below available for download in Pdf. The MCQ Questions for UG Computer Science with answers are aligned as per the latest syllabus and exam pattern suggested by CUET, NCERT and KVS. Multiple Choice Questions for Chapter 1 Database Query using SQL are an important part of exams for UG Computer Science and if practiced properly can help you to improve your understanding and get higher marks. Refer to more Chapter-wise MCQs for CUET UG Computer Science and also download more latest study material for all subjects
MCQ for UG Computer Science Chapter 1 Database Query using SQL
UG Computer Science students should refer to the following multiple-choice questions with answers for Chapter 1 Database Query using SQL in UG.
Chapter 1 Database Query using SQL MCQ Questions UG Computer Science with Answers
Question. What is the full form of SQL?
a. Structured Query Language
b. Structured Query List
c. Simple Query Language
d. None of these
Answer : A
Question. Which of the following store data in the form of rows and columns?
a. Form
b. Report
c. Table
d. Query
Answer : C
Question. In SQL, which command(s) is(are) used to change a table’s storage characteristics?
a. ALTER TABLE
b. MODIFY TABLE
c. CHANGE TABLE
d. All of the above
Answer : A
Question. Which of the following field referred to the primary key of another table?
a. Alternate Key
b. Primary Key
c. Candidate Key
d. Foreign Key
Answer : D
Question. A command that lets you change one or more fields in a record is
a. Insert
b. Modify
c. Look-up
d. All of the above
Answer : B
Question. Which of the following is not the DDL commands?
a. Alter
b. Create
c. Drop
d. Select
Answer : D
Question. Which SQL keyword is used to retrieve a maximum value?
a. MAXIMUM
b. MOST
c. UPPER
d. MAX
Answer : D
Question. DML stands for __________
a. Data Manipulation Language
b. Database Manipulation Language
c. Digital Manipulation Lesson
d. Digital Manipulation Language
Answer : A
Question. Which SQL keyword is used to sort the result-set?
a. SORT BY
b. ORDER
c. ORDER BY
d. SORT
Answer : C
Question. Aman wants to create a database in MySQL. Help him to identify the suitable command from the following:
a. Insert
b. Create
c. Update
d. Alter
Answer : B
Question. Which command is used for cleaning up the environment (sql with Python)?
a. my.close
b. is.close
c. con.close
d. mycon.close
Answer : D
Question. A field which uniquely identifies each and every record in a table is called ________
a. Foreign Key
b. Alternate Key
c. Composite Key
d. Primary Key
Answer : D
Question. Name the host name used for signing in the database.
a. localhost
b. localpost
c. localcost
d. none of the above
Answer : A
Question. SQL allows us to write statements for defining, modifying and deleting relation schemas. These are part of _____________.
a. DDL
b. DML
c. TCL
d. GCL
Answer : A
Question. Consider following SQL statement. What type of statement is this?
SELECT * FROM employee
a. DML
b. DDL
c. DCL
d. Integrity constraint
Answer : A
Question. Write query for the following:
Display all the details of those employees whose dept_id is D12 and whose salary is more than 5000.
a. Select * from employee where dept_id = “D12” and Salary > 5000;
b. Select * from employee where dept_id = D12 and Salary > 5000;
c. Select * from employee where dept_id = “D12” and Salary is more than 5000;
d. Select * employee where dept_id = “D12” and Salary > 5000;
Answer : A
Question. In SQL, which command is used to SELECT only one copy of each set of duplicable rows
a. SELECT DISTINCT
b. SELECT UNIQUE
c. SELECT DIFFERENT
d. All of the above
Answer : A
Question. ______ clause is used to display data in an ordered form with respect to a specified column.
a. FROM
b. WHERE
c. GROUP BY
d. ORDER BY
Answer : D
Question. Which of the following is not a legal method for fetching records from database from within Python?
a. fetchone()
b. fetchtwo()
c. fetchall()
d. fetchmany()
Answer : B
Question. Which of the following wild character (use with Like) represent exactly single character?
a. *
b. %
c. _(underscore)
d. ?
Answer : C
Question. What SQL statement do we use to display the record of all students whose last name contains 5 letters ending with “A”?
a. SELECT * FROM STUDENTS WHERE LNAME LIKE ‘_ _ _ _A’;
b. SELECT * FROM STUDENTS WHERE LNAME LIKE ‘ _ _ _ _ _’;
c. SELECT * FROM STUDENTS WHERE LNAME LIKE ‘ ????A’;
d. SELECT * FROM STUDENTS WHERE LNAME LIKE ‘*A’;
Answer : A
Question. Write a query to display names of all employees containing ‘se’ as a substring in name.
a. Select * from employee where ename like “%se%”
b. Select * from employee where ename like %”se”%
c. Select * from employee where ename = “%se%”
d. Select * from employee where ename like “_ _ _ _se”
Answer : A
Question. With SQL, how do you select all the records from a table named “Students” where the value of the column “FirstName” ends with an “a”?
a. SELECT * FROM Students WHERE FirstName =’a’
b. SELECT * FROM Students WHERE FirstName LIKE ‘a%’
c. SELECT * FROM Students WHERE FirstName LIKE ‘%a’
d. SELECT * FROM Students WHERE FirstName =’%a%’
Answer : C
Question. Which of the following is not the type of function in MySQL?
a. Single row function
b. Multiple row function
c. Aggregate function
d. Half row function
Answer : D
Question. Which connector is used for linking the database with Python code?
a. MySQL-connector
b. YesSQL: connector
c. PostSQL: connector
d. None of the above
Answer : A
Question. Identify the odd one out.
a. Max()
b. Min()
c. Count()
d. Upper()
Answer : D
Question. What is the meaning of “HAVING” clause is SELECT query?
a. To filter out the summary groups
b. To filter out the column groups
c. To filter out the row and column values
d. None of the mentioned
Answer : A
Question. ________ function returns the number of records in a table.
a. Count(column)
b. Count(*)
c. Select()
d. None of the above
Answer : B
Question. Which SQL function is used to count the number of rows in a SQL query?
a. COUNT ()
b. NUMBER ()
c. SUM ()
d. COUNT (*)
Answer : D
Question. The horizontal lines of table are called ______
a. Rows
b. Record
c. Both of the above
d. Attributes
Answer : C
Question. What will be the order of the data being sorted after the execution of given query
SELECT * FROM STUDENT ORDER BY ROLL_NO;
a.Custom Sort
b. Descending
c. Ascending
d. None of the above
Answer : C
Question. Which of the following statement is not correct in reference to MySQL?
a. It is an Open Source.
b. It is an RDBMS.
c. It is Case Sensitive.
d. It is ideal for both small and large applications.
Answer : C
Question. The pattern ‘- – – ’ matches any string of ________ three character. ‘- – – %’ matches any string of ____ three characters.
a. Atleast, Exactly
b. Exactly, Atleast
c. Atleast, All
d. All, Exactly
Answer : B
Question. Name the command used to change the existing data of the table.
a. Alter
b. Update
c. Create
d. Modify
Answer : B
Question. Which is the subset of SQL commands used to manipulate Oracle Database structures, including tables?
a. Data Definition Language(DDL)
b. Data Manipulation Language(DML)
c. Both of above
d. None
Answer : C
Question. When we create a table, we can specify that a column should not contain a Null value by using _________ constraint.
a. Not Null
b. Default
c. Not Empty
d. Null
Answer : A
Question. Which of the SQL statements is correct?
a. SELECT Username AND Password FROM Users
b. SELECT Username, Password FROM Users
c. SELECT Username, Password WHERE Username = ‘user1’
d. None of these
Answer : B
Question. Which command will delete the database from the system?
a. Drop
b. Delete
c. Remove
d. Clear
Answer : A
Question. Which of the following SQL commands is used to retrieve data?
a. DELETE
b. INSERT
c. SELECT
d. JOIN
Answer : C
Question. Write command to show all the records of table “document”
a. Select all from document;
b. Select * from document;
c. Display all from document;
d. Select all data from document;
Answer : B
Question. The data types CHAR (n) and VARCHAR (n) are used to create _______ and _______ types of string/text fields in a database.
a. Fixed, equal
b. Equal, variable
c. Fixed, variable
d. Variable, equal
Answer : C
Question. Write a command to associate NOT NULL constraint with attribute SName of table STUDENT.
a. Alter table student add SName Varchar(20) Not Null;
b. Alter table student modify SName Varchar(20) Not Null;
c. Alter table modify SName Varchar(20) Not Null;
d. Alter table student change SName Varchar(20) Not Null;
Answer : B
Question. Name the method which is used for displaying only one resultset.
a. fetchmany
b. fetchno
c. fetchall
d. fetchone
Answer : D
Question. Pick the correct username used for logging in database (sql with Python).
a. root
b. local
c. directory
d. host
Answer : A
Question. Write a query to display details of all employees who have been given a salary (i.e., salary is not null) and works in the department D1.
a. Select * from employee where salary = not null and dept_id = “D1”;
b. Select * from employee where salary is not null and dept_id = “D1”;
c. Select * from employee where salary = “not null” and dept_id = “D1”;
d. Select * from employee where salary is not null or dept_id = “D1”;
Answer : B
Question. An attribute in a relation is foreign key if it is the _________key in any other relation.
a. Candidate
b. Primary
c. Super
d. Sub
Answer : B
Question. Write a query to display details of all those employees whose name ends with ‘L’.
a. Select * from Employee where ename like “_ _ _ _ L”;
b. Select * from Employee where ename like “L%”;
c. Select * from Employee where ename = “L%”;
d. Select * from Employee where ename like “%L”;
Answer : D
Question. Which of the following will you use in the following query to display the unique values of the column dept_name?
SELECT _____________ dept_name FROM Company;
a.All
b. From
c. Distinct
d. Name
Answer : C
Question. Which clause is used with “aggregate functions”?
a. GROUP BY
b. SELECT
c. WHERE
d. Both (a. and (b.
Answer : A
Question. Which of the following functions returns one result per row?
a. Multiple Row Functions
b. Group Functions
c. Single Row Functions
d. Aggregate Functions
Answer : C
Question. Which of the following queries contains an error?
a. Select * from emp where empid = 10003;
b. Select empid from emp where empid=10006;
c. Select empid from emp;
d. Select empid where empid=1009 and lastname=’GUPTA’;
Answer : D
Question. Which function returns the sum of the values for the specified column?
a. Sum()
b. Add()
c. All()
d. Count()
Answer : A
Question. Which of the following is not an aggregate function?
a. Avg
b. Sum
c. With
d. Min
Answer : C
Question. The operation whose result contains all pairs of tuples from the two relations, regardless of whether their attribute values match.
a. Join
b. Cartesian product
c. Intersection
d. Set difference
Answer : B
Question. The vertical lines of table are called ______
a. Rows
b. Record
c. Both of the above
d. Attributes
Answer : D
Question. The FROM SQL clause is used to…
a. specify what table we are selecting or deleting data FROM
b. specify range for search condition
c. specify search condition
d. None of these
Answer : A
Question. Which command is used to change the structure of the table in MySQL?
a. Delete
b. Alter
c. Update
d. Modify
Answer : B
Question. Which of the following group functions ignore NULL values?
a. MAX
b. COUNT
c. SUM
d. All of the above
Answer : D
Question. _____________ command is used to open the existing database.
a. Open
b. Use
c. New
d. Create
Answer : B
Question. What is the full form of DDL?
a. Dynamic Data Language
b. Detailed Data Language
c. Data Definition Language
d. Data Derivation Language
Answer : C
Question. Command to view the structure of table is ____________
a. Desc
b. Display
c. Select
d. View
Answer : A
Question. Aggregate functions can be used in the select list or the _____ clause of a select statement. They cannot be used in a ______ clause.
a. Where, having
b. Having, where
c. Group by, having
d. Group by, where
Answer : B
vThe ________ clause is used to retrieve data according to some specified condition.
a. Where
b. From
c. Group By
d. Order By
Answer : A
Question. Which of the following sublanguages of SQL is used to query information from the data base and to insert tuples into, delete tuples from, and modify tuples in the database?
a. DML (Data Manipulation Language)
b. DDL (Data Definition Language)
c. Query
d. Relational Schema
Answer : A
Question. Write a query to display details of all the employees except those whose dept_id number is D01 or D02.
a. Select * from employee where dept_id != (“D01”, “D02”);
b. Select * from employee where dept_id in (“D01”, “D02”);
c. Select * from employee where dept_id not in (“D01”, “D02”);
d. Select * from employee where dept_id is (“D01”, “D02”);
Answer : C
Question. If column “Marks” contains the data set {25, 35, 25, 35, 38}, what will be the output after the execution of the given query?
SELECT MARKS (DISTINCT) FROM STUDENTS;
a. 25, 35, 25, 35, 38
b. 25, 25, 35, 35
c. 25, 35, 38
d. 25, 25, 35, 35
Answer : C
Question. Which of the following wild character (use with Like) represent multiple characters?
a. *
b. %
c. _(underscore)
d. ?
Answer : B
CUET Computer Science MCQs Chapter 1 Database Query using SQL |
CUET Computer Science MCQs Chapter 1 Exception and File Handling in Python |
CUET Computer Science MCQs Chapter 2 Stack |
CUET Computer Science MCQs Chapter 3 Queue |
CUET Computer Science MCQs Chapter 4 Searching |
CUET Computer Science MCQs Chapter 5 Sorting |
CUET Computer Science MCQs Chapter 6 Understanding Data |
CUET Computer Science MCQs Chapter 7 Database Concepts |
CUET Computer Science MCQs Chapter 8 Structured Query Language |
CUET Computer Science MCQs Chapter 9 Computer Networks |
MCQs for Chapter 1 Database Query using SQL Computer Science UG
Expert teachers of studiestoday have referred to NCERT book for UG Computer Science to develop the Computer Science UG MCQs. If you download MCQs with answers for the above chapter you will get higher and better marks in UG test and exams in the current year as you will be able to have stronger understanding of all concepts. Daily Multiple Choice Questions practice of Computer Science will help students to have stronger understanding of all concepts and also make them expert on all critical topics. After solving the questions given in the MCQs which have been developed as per latest books also refer to the NCERT solutions for UG Computer Science. We have also provided lot of MCQ questions for UG Computer Science so that you can solve questions relating to all topics given in each chapter. After solving these you should also refer to UG Computer Science MCQ Test for the same chapter.
You can download the CUET MCQs for UG Computer Science Chapter 1 Database Query using SQL for latest session from StudiesToday.com
Yes, the MCQs issued by CUET for UG Computer Science Chapter 1 Database Query using SQL have been made available here for latest academic session
You can find CUET UG Computer Science Chapter 1 Database Query using SQL MCQs on educational websites like studiestoday.com, online tutoring platforms, and in sample question papers provided on this website.
To prepare for Chapter 1 Database Query using SQL MCQs, refer to the concepts links provided by our teachers and download sample papers for free.
Yes, there are many online resources that we have provided on studiestoday.com available such as practice worksheets, question papers, and online tests for learning MCQs for UG Computer Science Chapter 1 Database Query using SQL