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

WAT-1

The document contains a series of SQL-related questions and tasks, including identifying SQL statements for various operations, writing syntax examples, and creating queries based on a STUDENT table. It covers topics such as counting records, displaying current date and time, and manipulating database tables. Additionally, it asks for specific queries to retrieve and modify data in the database.

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

WAT-1

The document contains a series of SQL-related questions and tasks, including identifying SQL statements for various operations, writing syntax examples, and creating queries based on a STUDENT table. It covers topics such as counting records, displaying current date and time, and manipulating database tables. Additionally, it asks for specific queries to retrieve and modify data in the database.

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/ 2

1. Answer the following question?

[1*11=11]

i. Which SQL statement do we use to find out the total number of records present in the table
ORDERS?
a) SELECT * FROM ORDERS;
b) SELECT COUNT (*) FROM ORDERS;
c) SELECT FIND (*) FROM ORDERS;
d) SELECT SUM () FROM ORDERS;
ii. In SQL, which function is used to display current date and time?
(a) Date () (b) Time () (c) Current () (d) Now ()
iii. SQL stands for -----------------------?
(a) Structured Query Language (b) Sequential Query Language
(c) Structured Question Language (d) Sequential Question Language
iv. DBMS stands for ------------------------?
(a) Database management system (b) Database management software
(c) Database manage system (d) none of these
v. Write MySQL command to open an existing database.
vi. Table SCHOOL has 4 rows and 5 columns. What is the Cardinality and Degree of this table?
vii. Which function is used to display power of number?
viii. Which function is used to display small letter of a string?
ix. Which MySQL command is used to delete a table?
x. Which MySQL command is used to display all exist database in our MySql?
xi. Which MySQL command is used to create a new databases?

2. Answer the following question syntax with example (any 5) [2*5=10]

a) Write Update syntax with example?


b) How to delete all records in existing table?
c) How to delete a row in existing table?
d) How to add multiple column in existing table?
e) How to delete multiple column in existing table?
f) How to display specific column in existing table?

3. Answer the following question syntax with Output? [3*3=09]

a) Based on the STUDENT table given here ,write a suitable queries for the 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. 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?

You might also like