wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Transactions MYSQL

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Quelle commande est utilisée pour désactiver le mode autocommit dans MySQL ?

a)

SET autocommit = 0;

b)

SET autocommit = OFF;

c)

SET autocommit = 1;

d)

SET autocommit = ON;

2.

Quelle commande est utilisée pour démarrer explicitement une transaction en MySQL ?

a)

BEGIN;

b)

START TRANSACTION;

c)

COMMIT;

d)

ROLLBACK;

3.

Quelle commande est utilisée pour valider une transaction en MySQL ?

a)

COMMIT;

b)

ROLLBACK;

c)

BEGIN;

d)

START TRANSACTION;

4.

Quelle commande est utilisée pour annuler une transaction en MySQL ?

a)

COMMIT;

b)

ROLLBACK;

c)

BEGIN;

d)

START TRANSACTION;

5.

Que se passe-t-il si une transaction est validée avec COMMIT; ?

a)

Toutes les modifications sont annulées.

b)

Toutes les modifications sont enregistrées de manière permanente.

c)

La transaction est verrouillée.

d)

La transaction est supprimée.

6.

Que se passe-t-il si une transaction est annulée avec ROLLBACK; ?

a)

Toutes les modifications sont enregistrées de manière permanente.

b)

Toutes les modifications sont annulées.

c)

La transaction est verrouillée.

d)

La transaction est supprimée.

7.

Quelle commande est utilisée pour vérifier l'état du thread du planificateur d'événements en MySQL ?

a)

SHOW EVENTS;

b)

SHOW PROCESSLIST;

c)

SHOW TRANSACTIONS;

d)

SHOW SCHEDULER;

8.

Quelle commande est utilisée pour créer un événement récurrent en MySQL ?

a)

CREATE EVENT ... ON SCHEDULE AT ...

b)

CREATE EVENT ... ON SCHEDULE EVERY ...

c)

CREATE EVENT ... ON SCHEDULE ONCE ...

d)

CREATE EVENT ... ON SCHEDULE INTERVAL ...

9.

Quelle commande est utilisée pour afficher tous les événements dans une base de données MySQL ?

a)

SHOW EVENTS;

b)

SHOW PROCESSLIST;

c)

SHOW SCHEDULER;

d)

SHOW TRANSACTIONS;

10.

Quelle clause est utilisée pour conserver un événement après son expiration en MySQL ?

a)

ON COMPLETION PRESERVE

b)

ON COMPLETION DELETE

c)

ON COMPLETION KEEP

d)

ON COMPLETION RETAIN

11.

Quelle commande est utilisée pour supprimer un événement en MySQL ?

a)

DROP EVENT;

b)

DELETE EVENT;

c)

REMOVE EVENT;

d)

ERASE EVENT;

12.

Quelle commande est utilisée pour créer un événement ponctuel en MySQL ?

a)

CREATE EVENT ... ON SCHEDULE AT ...

b)

CREATE EVENT ... ON SCHEDULE EVERY ...

c)

CREATE EVENT ... ON SCHEDULE ONCE ...

d)

CREATE EVENT ... ON SCHEDULE INTERVAL ...

13.

Quelle commande est utilisée pour démarrer une transaction et mettre à jour le prix d'un produit avec l'ID 1 à 100 ?

a)

BEGIN; UPDATE products SET Price=100 WHERE ProductID=1;

b)

START TRANSACTION; UPDATE products SET Price=100 WHERE ProductID=1;

c)

COMMIT; UPDATE products SET Price=100 WHERE ProductID=1;

d)

ROLLBACK; UPDATE products SET Price=100 WHERE ProductID=1;

14.

Quelle commande est utilisée pour annuler une transaction après avoir mis à jour le prix d'un produit avec l'ID 1 à 100 ?

a)

COMMIT;

b)

ROLLBACK;

c)

BEGIN;

d)

START TRANSACTION;

15.

Quelle commande est utilisée pour créer un événement qui s'exécute toutes les minutes pendant une heure ?

a)

CREATE EVENT ... ON SCHEDULE EVERY 1 MINUTE STARTS NOW() ENDS NOW() + INTERVAL 1 HOUR;

b)

CREATE EVENT ... ON SCHEDULE EVERY 1 HOUR STARTS NOW() ENDS NOW() + INTERVAL 1 MINUTE;

c)

CREATE EVENT ... ON SCHEDULE EVERY 1 MINUTE STARTS NOW() + INTERVAL 1 HOUR ENDS NOW();

d)

CREATE EVENT ... ON SCHEDULE EVERY 1 HOUR STARTS NOW() + INTERVAL 1 MINUTE ENDS NOW();