« MySQL/Manipulation de table » : différence entre les versions

Contenu supprimé Contenu ajouté
→‎Renommer une table : Un seul syntaxhighlight
→‎DROP TABLE : Un seul syntaxhighlight
Ligne 133 :
== DROP TABLE ==
<syntaxhighlight lang=sql>
DROP TABLE `awards`
--Supprime toute la table (enregistrements et structure).
</syntaxhighlight>
Supprime toute la table (enregistrements et structure).
 
-- Plusieurs :
DROP TABLE `table1`, `table2`, ...
<syntaxhighlight lang=sql>
DROP TABLE `table1`, `table2`, ...
</syntaxhighlight>
 
-- Avec vérification :
DROP TEMPORARY TABLE `table` IF EXISTS;
<syntaxhighlight lang=sql>
DROP TEMPORARY TABLE `table` IF EXISTS;
DROP TABLE `table` IF EXISTS;
</syntaxhighlight>