Quelle valeur renvoie la dernière instruction SQL de la liste ci-dessous :
CREATE TABLE t (
a integer,
b integer,
c integer);
INSERT INTO t VALUES (0, 0, 0);
INSERT INTO t VALUES (1, 0, 0);
SELECT sum(a) + count(b) FROM t;
6
Contenus de la table :
Après Create : Ø
Après Insert n°1 :
0 | 0 | 0 |
Après Insert n°2 :
0 | 0 | 0 |
1 | 0 | 0 |
On a sum(a) = 1 et count(b) = 2 donc La requête renvoie 3.