Assignment On Sql2
Assignment On Sql2
use UserTable;
create table UserTable(user_id int(2),username varchar(9),email
varchar(15),birthdate varchar(10));
insert into UserTable values(1,'Mohan','[email protected]','26-01-1999');
insert into UserTable values(2,'Sai','[email protected]','06-01-1999');
insert into UserTable values(3,'Shiva','[email protected]','24-01-1989');
insert into UserTable values(4,'Ram','[email protected]','26-01-1999');
insert into UserTable values(5,'Raju','[email protected]','26-06-1998');
insert into UserTable values(6,'Rohan','[email protected]','26-03-1996');
insert into UserTable values(7,'Rohit','[email protected]','26-01-1999');
select * from UserTable;
select username,birthdate from UserTable;
select * from UserTable where username='Mohan' and birthdate='26-01-1999';
select * from UserTable where username='Mohan' or birthdate='26-01-1999';
select user_id,email from UserTable where username='Mohan' and birthdate='26-01-
1999';
select user_id,email from UserTable where username='Mohan' or birthdate='26-01-
1999';
show tables;
describe UserTable;
insert into UserTable (user_id,username,email)values(8,'Ram','[email protected]');
insert into UserTable(user_id,username,birthdate) values(9,'Rohit','26-01-1999');