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

mysql> use university;

Database changed

mysql> create table student;

mysql> create table student(

-> StudID int(10) primary key,

-> Studname varchar(15),

-> StudDep varchar(20),

-> StudYear varchar(10));

mysql> describe students;

mysql> insert into Student (StudID,Studname,StudDep,StudYear)

-> values ('1','Mayuresh','IT','TE');

Query OK, 1 row affected (0.10 sec)

mysql> insert into Student (StudID,Studname,StudDep,StudYear)

-> values('2','Pratik','IT','TE');

Query OK, 1 row affected (0.07 sec)

mysql> insert into Student (StudID,Studname,StudDep,StudYear)

-> values('3','Shivam','IT','TE');

Query OK, 1 row affected (0.10 sec)


mysql> insert into Student (StudID,Studname,StudDep,StudYear)

-> values('4','Om','IT','TE');

Query OK, 1 row affected (0.05 sec)

mysql> update Student

-> set StudDep='CS',fee='20000'

-> where StudID='1';

Query OK, 1 row affected (0.04 sec)

Rows matched: 1 Changed: 1 Warnings: 0

mysql> select* from student;

mysql> delete from student

-> where StudID='4';

Query OK, 1 row affected (0.05 sec)

mysql> select* from student;

You might also like