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);
INSERT INTO t
SELECT * FROM t;
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)
Après Insert n°3 : (0,0,0) (1,0,0) (0,0,0) (1,0,0)
On a sum(a) = 2 et count(b) = 4 donc La requête renvoie 6.