--외래키무시.
SET foreign_key_checks = 0;
SET @tables = NULL;
SELECT GROUP_CONCAT(table_schema, '.', table_name) INTO @tables
FROM information_schema.tables
WHERE table_schema = '데이터베이스명'; -- specify DB name here.
SET @tables = CONCAT('DROP TABLE ', @tables);
PREPARE stmt FROM @tables;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
--외래키 다시 허용.
SET foreign_key_checks = 1;
2017. 1. 4.
Mysql :: 데이터베이스 하위 테이블 모두 삭제
피드 구독하기:
댓글 (Atom)
-
CentOS 6 기준 오라클 버전확인. # sqlplus /nolog SQL> conn sys as sysdba Enter password: 암호! SQL> select * from v$version; ----------...
-
https://github.com/joshcam/PHP-MySQLi-Database-Class Initialization To utilize this class, first import MysqliDb.php into your project...
-
1. 경로찾기 # find -name 'apxs' -print 2. 경로가 안나온다면 # yum install httpd-devel 다시 경로를 찾아보면 나온다.
댓글 없음:
댓글 쓰기