DBMS/MySQL

[MySQL] 데이터베이스 테이블수 및 정보 조회, 컬럼 수 및 조회

antoroong 2025. 2. 17. 21:49

테이블 test 이름이 들어간 테이블 조회

SELECT * FROM information_schema.TABLES WHERE table_name LIKE CONCAT('%','test','%');

 

 

테이블 test 이름이 들어간 테이블 수

SELECT count(*) FROM information_schema.TABLES WHERE table_name LIKE CONCAT('%','test','%');

 

 

test이름이 들어간 테이블의 컬럼 조회

SELECT * FROM information_schema.columns WHERE table_name LIKE CONCAT('%','test','%');

 

 

test 이름이 들어간 테이블의 컬럼수 조회

SELECT COUNT(*) FROM information_schema.columns WHERE table_name LIKE CONCAT('%','test','%');