Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

PRACTICAL QUESTIONS

Q1. Create a table and insert values in it.


Creating a basic table involves naming the table and defining its columns and each
column’s data type.
SYNTAX: create table table_name(column1 data type primary key, column2 data
type, column3 data type……
QUERY:
For creating student table the following command is: create table student_1(id
integer(3) primary key, name char(20), email varchar(30));
OUTPUT:

For inserting values:


Insert into statement is used to insert new records in table
SYNTAX: insert into table_name values(value1, value2,…..)
QUERY:
For inserting values in student table the following command is insert: insert into
student_1 values (1, “roy”, roysingh123@gmail.com); and many more..
Output:

Q3. Create employee table & insert values in it.


Insert values in it

Q6. Display all employee salary.


Q7. Display total number of departments in the company.
Q9. Display the names of the employee whose name starts with “a”.

Q10. Display name of those employee whose second alphabet is ‘a’ .


Q11. Display id & name of those employees who lives in delhi/mumbai.

You might also like