Computer >> Máy Tính >  >> Lập trình >> MySQL

Thông tin nào hiển thị SHOW TABLE DOES trong MySQL

TÌNH TRẠNG BẢNG HIỂN THỊ trong MySQL hiển thị TÊN, ĐỘNG CƠ, PHIÊN BẢN, ROWS, CHECKSUM, v.v. của bảng -

Ví dụ

Đầu tiên chúng ta hãy tạo một bảng. Ở đây, chúng tôi đang sử dụng công cụ MyISAM. Truy vấn để tạo bảng như sau -

mysql> create table Post_Demo
   -> (
   -> PostId int,
   -> PostName varchar(100),
   -> PostDate datetime,
   -> PRIMARY KEY(PostId)
   -> )ENGINE = MyISAM;
Query OK, 0 rows affected (0.28 sec)

Bây giờ bạn có thể kiểm tra trạng thái bảng bằng lệnh SHOW TABLE. Truy vấn như sau -

mysql> show table status where Name = 'Post_Demo'\G

Đầu ra

*************************** 1. row ***************************
Name: post_demo
          Engine: MyISAM
         Version: 10
      Row_format: Dynamic
            Rows: 0
  Avg_row_length: 0
     Data_length: 0
 Max_data_length: 281474976710655
    Index_length: 1024
       Data_free: 0
Auto_increment: 1
   Create_time: 2019-02-12 16:27:26
    Update_time: 2019-02-12 16:27:26
    Check_time: NULL
      Collation: utf8_general_ci
      Checksum: NULL
Create_options:
       Comment:
1 row in set (0.00 sec)