DROP TABLE is an SQL command used for removing tables from a database. When you delete a table, all data, indexes, and constraints associated with that table are deleted. This command cannot be undone, so it's important to use it carefully and create a backup of the data if needed.
DROP TABLE table;
DROP TABLE IF EXISTS table;
SHOW TABLES LIKE 'table';
SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS table; SET FOREIGN_KEY_CHECKS = 1;
SHOW TABLES;
CREATE TABLE backup AS SELECT * FROM table; DROP TABLE IF EXISTS table;
Thank you for visiting! Adding privacy policy.
© 2024 All rights reserved.
Vam je koda pomagala? Če želite podpreti moj trud pri pripravi vodičev in vzdrževanju strani, mi lahko namenite donacijo za kavo.