Database in DOS-internal exercise carried out in
to create a database through the DOS is no need of these small steps:
/ / sqlite folder and go on to write:
example
sqlite3 android.db ;
/ / to create the database: create table
restaurant (id int, name varchar (30), Address varchar (30), primary key (id));
/ / to insert the data: one column each comma rows and each time I add data
insert into restaurant values \u200b\u200b(1, "Calimero", "via black chick n 34);
values \u200b\u200binsert into restaurant (2," Osteria del Wolverine " "via del sorcio morto n 22");
select * from ristorante; //per mostrare tutta la tabella
select * from ristorante where id=1; // per mostrami una riga
//per modificare una riga già inserita nella tabella
update ristorante set indirizzo="via del sorcio vivo n 22" where id=2;
//per cancellare una riga già inserita nella tabella
delete from ristorante where id=1;
NB: terminare i comandi da dare a SQLITE sempre con il punto e virgola.
0 comments:
Post a Comment