SQLize Online / PHPize Online

Share      Blog   Popular
Copy Format Clear
create table Clienti ( id_cliente char(3) primary key, ragione_sociale varchar(60), indirizzo varchar(60), partita_iva char(11) ); create table Fatture ( numero int primary key, data date, id_cliente char(3) references Clienti(id_cliente), importo double(8,2) ); insert into Clienti values ("100", "Dadi & viti SpA", "via piave 15", "12345678912"); select * from Clienti; insert into Fatture values (1235, "2018-10-12", "100", 1000.00); insert into Fatture values (1236, "2018-10-14", "110", 1100.00); insert into Fatture values (1231, "2018-10-16", "120", 1200.00); alter table Fatture Add column qta int; select * from Fatture; alter table Fatture drop column qta; select * from Fatture; select * from Fatture where importo>1000; select data, importo from Fatture; select * from Fatture where importo>1000 and importo<1200; select * from Fatture where importo between 1000 and 1100; select * from Fatture where id_cliente="100"; select * from Clienti where ragione_sociale like "D%"; select * from Fatture where id_cliente="100" and importo>1200;
Stuck with a problem? Got Error? Ask ChatGPT!