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 Database priya; Show Databases; Use priya; Create Table test ( Name VARCHAR(30), Id INT Primary Key, Grade varchar(10)); Show Tables; Alter table test add Section Char(10); describe test; Insert into test (Name,Id) Values ('Priya',100 ),('Riya',101); Select * from test; Select Name, Id from test; Insert into test values('Priya',102,8,'A'); Insert into test values('Pragya',104,8,'A'),('Sarah',105,8,'B'),('Lizy',106,8,'A'); Select * from test; Select * from test where Name like 'P%'; Select * from test where Name not like 'P%'; Select Name, Id*3 from test; Select * from test where Name like '%a' and Name like 'P%'; Select * from test where Name like '%a' or Name like 'P%'; Select * from test where Id>103; Select * from test where Section ='A'; Update test set Id=305 where Name ='Riya'; Select * from test; delete from test where Name like 'R%'; Select * from test; Alter table test rename column Section to Sec; Alter table test modify Sec varchar(30); Alter table test drop column Sec; drop table test;

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

Copy Clear