Comandi SQL
Comandi SQL
1- DATABASE
◼ COMANDO PER ENTRARE NELL’INTERFACCIA
# mysql
# show databases;
# use nome;
2- TABELLA
◼ COMANDO PER CREARE UNA TABELLA
# describe nomeTabella;
# update nomeTabella
# set nomeCampo=valore
# where condizione;
# select nomeCampo
# from nomeTabella
# where condizione1 AND condizione2;
◼ OPERATORE OR
# select nomeCampo
# from nomeTabella
# where condizione1 OR condizione2;
◼ OPERATORE IN
# select nomeCampo
# from nomeTabella
# where nomeCampo IN (valore1, valore2,…);
◼ OPERATORE BETWEEN
# select nomeCampo
# from nomeTabella
# where nomeCampo BETWEEN valore1 AND valore2;
◼ OPERATORE LIKE
# select nomeCampo
# from nomeTabella
# where nomeCampo LIKE {modello};
MODELLI :
◼ MEDIA (AVG)