SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table stud ( id int, name varchar(120), mobileno number(10), dob date ); insert into stud values(10,'sujal',9960451586,'08-jan-2003'); insert into stud values(11,'yash',9960221586,'10-mar-2005'); insert into stud values(12,'gala',9960231586,'01-sep-2004'); insert into stud values(13,'gori',9960232158,'25-oct-2001'); insert into stud values(14,'sahil',9960232123,'25-dec-2000'); select* from stud; alter table stud add address varchar(100); select * from stud; update stud set address='mumbai'; select * from stud; update stud set address='vasai' where id=10; select * from stud; create table stud1 as select * from stud; truncate table stud; select * from stud; drop table stud; select * from stud; select * from stud1; delete from stud1 where id=10; select * from stud1; insert into stud1 values(10,'sujal',9136315161,'11-jan-2006','bhayandar'); select* from stud1; create view stud1view as select id,address from stud1; select * from stud1view; create view stud2view as select id,mobileno from stud1; select * from stud2view; create view stud3view as select name,dob from stud1; select * from stud3view; truncate table stud3; select* from stud3view; create table emp ( id int, name varchar(100), sal number ); create table dept ( id int, deptname varchar(100), address varchar(100) ); insert into emp values(100,'yash',1000); insert into emp values(101,'gala',2000); insert into emp values(102,'sujal',500000); insert into emp values(103,'sahil',10); select * from emp; insert into dept values(100,'IT','nallasopara'); insert into dept values(101,'Finance','gala nagar'); insert into dept values(102,'law','khachrewali gali'); insert into dept values(103,'Arts','vagri pada'); select * from dept;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear