DEV Community

sunj
sunj

Posted on

Sql, table 모두 삭제

SELECT Concat('DROP TABLE ', table_schema, '.', TABLE_NAME, ';')
FROM INFORMATION_SCHEMA.TABLES where table_schema = '데이터베이스이름';
Enter fullscreen mode Exit fullscreen mode
foreign_key 무시
set foreign_key_checks = 0;
Enter fullscreen mode Exit fullscreen mode

참조 : https://velog.io/@cykim/MySQL-%ED%85%8C%EC%9D%B4%EB%B8%94-%EC%A0%84%EC%B2%B4-%EC%82%AD%EC%A0%9C_

Top comments (0)