0% found this document useful (0 votes)
2 views

CBSE TERM

The document consists of a series of questions related to SQL and database management, covering topics such as SQL functions, commands, and constraints. It includes multiple-choice questions, short answer questions, and practical query writing tasks based on hypothetical student and participant tables. The questions assess knowledge on aggregate functions, data manipulation, and database structure, among other SQL concepts.

Uploaded by

Sidhartha Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

CBSE TERM

The document consists of a series of questions related to SQL and database management, covering topics such as SQL functions, commands, and constraints. It includes multiple-choice questions, short answer questions, and practical query writing tasks based on hypothetical student and participant tables. The questions assess knowledge on aggregate functions, data manipulation, and database structure, among other SQL concepts.

Uploaded by

Sidhartha Nayak
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Answer the following question [1*10=10] j) Describe the ABS() function.

a) In SQL, which function is used to display current date and time? 3. Answer the following question (any 10) [2*10=20]
(a) Date ( ) (b) Time ( ) (c) Current ( ) (d) Now ()
a) Explain two aggregate functions in SQL.
b) SQL stands for -----------------------?
b) Write a command to add a NOT NULL constraint on FEES column of a
(i) Structured Query Language (ii) Sequential Query Language
student table.
(iii) Structured Question Language (iv) Sequential Question Language
c) What is primary key ?
c) DBMS stands for ------------------------?
d) Write Update syntax with example?
(i) Database management system (ii) Database management software
e) How to delete all records in existing table?
(iii) Database manage system (iv) none of these
f) How to delete a row in existing table?
d) Which SQL statement do we use to find out the total number of records
g) How to add multiple column in existing table?
present in the table ORDERS?
h) How to delete multiple column in existing table?
(i ) SELECT * FROM ORDERS;
i) How to display specific column in existing table?
(ii) SELECT COUNT (*) FROM ORDERS;
j) Which of the following types of table constraints will prevent the entry of
(iii) SELECT FIND (*) FROM ORDERS;
duplicate rows with reason?
(iv) SELECT SUM () FROM ORDERS;
(i) unique (ii) Distinct (iii) Primary key (iv) null
e) Write MySQL command to open an existing database.
k) Ravina has stored the records of all students of her class in a MYSQL table.
f) Table SCHOOL has 4 rows and 5 columns. What is the Cardinality and
Suggest a suitable SQL clause that she should use to display the names of
Degree of this table?
students in alphabetical order with sql command
g) Which function is used to display power of number?
(i) Sort by (ii) order by (iii) Group by (iv) Align by
h) Which function is used to display small letter of a string?
l) SELECT DISTINCT is used if a user wishes to see duplicate columns in a
i) Which MySQL command is used to delete a table?
query with reason?
j) Which MySQL command is used to display all exist database in our MySql?
(i) True (ii) False
2. Answer the following question [1*10=10]
3. Answer the following question [1*09=9]
a) Which MySQL command is used to create a new databases?
b) Which function is used to remove blank space remove from both side?
c) Name two mathematical functions in SQL.
d) Which MySQL command is used to display structure of our database?
e) Which command is used to display all tables in database?
f) DDL stands for --------------------------?
(i) Data Difference Language (ii) Data Define Language
(iii) Data Definition Language (iv) none of these
g) DML stands for --------------------------?
(i) Database Manipulation Language (ii) Data Manipulation Language
(iii) Data Manage Language (iv) none of these
h) Name of two DDL commands? a) Based on the STUDENT table given here ,write a suitable queries for the
i) What does the POWER() function do? following
i. Write a query to display name and city column in an existing table?
ii. Write a query to display those students are secured greater than 400
marks?
iii. Write a query to display those students are lived in agra and delhi?
b) Based on the STUDENT table given here ,write a suitable queries for the
following
i. Write a query to add a DOB column in existing table?
ii. Write a query to delete 3 rows in existing table?
iii. Write a query to display name column in descending order?
c) Based on the STUDENT table given here ,write a suitable queries for the
following
i. Write a query to update anchal mark in a existing table?
ii. Write a query to change column roll no to SL_NO. ?
iii. Write a query to display all records where gender is ‘M’ ?
4. Based on the STUDENT table given here ,write a suitable queries for the
following [5*1=5]

i. To display details of all PARTICIPANTS of CLASS 10 and 12 ?


ii. To display the SNAME and CLASS of all PARTICIPANTS in ascending
order of their SNAME and descending order of class ?
iii. To display the number of PARTICIPANTS along with their respective
CLASS, of every CLASS.
iv. SELECT DISTINCT EVENT FROM PARTICIPANTS; (display output)
v. SELECT MAX (DOB), PNO FROM PARTICIPANTS GROUP BY PNO
HAVING COUNT(*)>1;( display output)
6. Based on the participants table given here ,write a suitable queries [5*1=05]
i. Write a query to create a table based on STUDENT table?
ii. Write a query to insert 3 rows in a student table?
iii. Write a query to display mark range 380 to 500?
iv. Write a query to display name of the student whose name start with ‘N’?
v. Write a query to display name and city of the student whose mark less than
300?
5. Based on the participants table given here ,write a suitable queries for the
following [5*1=05]
i. Display the details of all the Hotels situated in London.
ii. Display the details of all 'Deluxe' rooms with price more than 6000 in
ascending order of Price.
iii. Display the Hotel names that end with "e".
iv. Count different types of rooms available in the Hotels.
v. Display the hotel name in descending order
7. Based on the ITEM table given here ,write a suitable queries [6*1=06]

i. Display the first 3 characters of the Itemname


ii. Display the month name from the Stockdate.
iii. Display the the total price of the whole stock.
iv. Display the average Price of all the stocks
v. Display all the price round off up to 2 decimal place
vi. Display minimum price of an item?

You might also like