Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
CREATE TABLE student(id int(20),Name varchar(40), Subject varchar(20),Salary int(20)); INSERT INTO student(id,Name,Subject,Salary) VALUES(101,"AMIT KUMAR","Math",50000), (102,"honey singh","Math",50000), (103,"Ravi k","English",45000), (104,"Naveen ch","Chemistery",65000), (105,"Rahul singh","Physics",75000); SELECT * FROM student; select * from student where salary>50000; ALTER table student change column Salary amt int(20); SELECT * FROM student; UPDATE student set amt = amt + amt*0.25; SELECT * FROM student; ALTER TABLE student ADD column city varchar(20) default "gurgao"; SELECT * FROM student; CREATE TABLE student_info(Roll_no int(20),name varchar(20),city varchar(20),marks int(10)); SELECT * FROM student_info; INSERT INTO student_info(ROll_no,name,city,marks) VALUES (101,"adam","delhi",55), (102,"shivam singh","Punjan",65),(103,"shubham","bihar",45),(105,"krishna","delhi",89),(151,"priya","banglore",95);

Stuck with a problem? Got Error? Ask AI support!

Copy Clear