Câu trả lời:
Điều này có nhiều cột hơn SHOW TABLE STATUS; nhưng lừa
SELECT * FROM information_schema.tables WHERE table_schema = DATABASE();
CẬP NHẬT 2011-06-07 19:02
SELECT table_name,Engine,Version,Row_format,table_rows,Avg_row_length,
Data_length,Max_data_length,Index_length,Data_free,Auto_increment,
Create_time,Update_time,Check_time,table_collation,Checksum,
Create_options,table_comment FROM information_schema.tables
WHERE table_schema = DATABASE();
Các truy vấn này hoạt động nếu bạn đặt cơ sở dữ liệu hiện tại.
Bạn cũng có thể mã cứng cơ sở dữ liệu cụ thể:
SELECT table_name,Engine,Version,Row_format,table_rows,Avg_row_length,
Data_length,Max_data_length,Index_length,Data_free,Auto_increment,
Create_time,Update_time,Check_time,table_collation,Checksum,
Create_options,table_comment FROM information_schema.tables
WHERE table_schema = 'mysql';
show table status like 'table1';
Bạn không thể thao tác các cột theo cách này, nhưng sẽ dễ dàng hơn khi chỉ chọn các bảng bạn muốn và nhận SHOW TABLE STATUSđầu ra bình thường .
Bạn có thể sử dụng truy vấn này để hiển thị tất cả Lược đồ thông tin.
CHỌN * TỪ information_schema.tables WHERE table_schema = DATABASE ();
hoặc tốc ký:
HIỂN THỊ BẢNG TÌNH TRẠNG THÍCH 'tên bảng'