Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> MySQL

วิธีตรวจสอบสถานะตารางในฐานข้อมูล MySQL เฉพาะเจาะจง

เราสามารถตรวจสอบสถานะของตารางในฐานข้อมูลได้ด้วยความช่วยเหลือของคำสั่ง show table status ตัวอย่างเช่น ในฐานข้อมูลชื่อ tutorial ด้วยการรันคำสั่งนี้ เราสามารถรับสถานะของตารางได้ดังนี้

mysql> show table status \G
*************************** 1. row ***************************
  Name: student
  Engine: InnoDB
  Version: 10
  Row_format: Compact
  Rows: 0
  Avg_row_length: 0
  Data_length: 16384
  Max_data_length: 0
  Index_length: 0
  Data_free: 7340032
  Auto_increment: NULL
  Create_time: 2017-10-24 09:34:29
  Update_time: NULL
  Check_time: NULL
  Collation: latin1_swedish_ci
  Checksum: NULL
  Create_options: 
  Comment:
1 row in set (0.00 sec)

ฐานข้อมูลนี้มีเพียงตารางเดียวชื่อ 'student'