DROP TABLE IF EXISTS diaries;
SET NAMES UTF8MB4;
CREATE TABLE diaries (
id INT PRIMARY KEY,
title VARCHAR(255),
content TEXT,
FULLTEXT INDEX (content)
) DEFAULT CHARSET UTF8MB4;
INSERT INTO diaries VALUES(1, "Hello", "今日からはじめました。");
INSERT INTO diaries VALUES(2, "天気", "明日の富士山の天気について");
INSERT INTO diaries VALUES(3, "富士山", "今日も天気がよくてきれいに見える。");
SELECT COUNT(*)
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = "diaries" AND DATA_LENGTH > 0;
COUNT(*)
1
DROP TABLE diaries;
