Class X MySQL 2021-22

Hello Guys Pls Follow us to get more lattest information and I have a YouTube Channel @Learning FDS Pls click on the Youtube icon and viait once

 

Students Don't miss this

Hello Students here is Some important Questions and answer of Computer Science (MySQL) for HSLC examination 2022

1. Write the appropriate queries of the following :

a) Activate the database named Varun.

Ans: USE Varun;

b) Write the query to set custID as the Primary Key.

Ans: ALTER TABLE Customer ADD PRIMARY KEY (custID);

c) Write the query to add a column CustAge of integer data type of size 2.

Ans: ALTER TABLE Customer ADD CustAge int(2);

d) Write the query to modify the size of CustName to size 30.

Ans: ALTER TABLE Customer MODIFY CustName VARCHAR(30);

e) Write a query to change the column name CardCategory to CustCardCat.

Ans: ALTER TABLE Customer CHANGE CardCategory CustCardCat VARCHAR(30);

f) Display the structure of the table Customer.

Ans: DESC Customer;

g)  Activate the database name Hospital.

Ans: USE Hospital;

h) Rename the table student to StudentDetail.

Ans: ALTER TABLE Student RENAME StudentDetail;

i) Change the column StudentID to StuID.

Ans: ALTER TABLE Student CHANGE StudentID StuID VARCHAR(30);

j) Display the structure of the table Student.

Ans: DESC Students;

k) Display the contents of the table Student.

Ans: Select * FROM Student;

l) Write the query to add the primary key of several constant to EmpID column of the Employee table.

Ans: ALTER TABLE Employee ADD PRIMARY KEY (EmpID);


Thanks You *** Best of Luck*** 

Follow us for more updates

Comments

Popular Posts