Friday, May 11, 2012

Query to know particular table status in MySql

In Mysql, we can execute several queries. Here, i am going to demonstrate about important query. This query will show you the properties belongs to particular table.

Query :         

SHOW TABLE STATUS LIKE TableName

The above query will return following coulmns,
  1. Name
  2. Engine
  3. Version
  4. Row_format
  5. Rows
  6. Avg_row_length
  7. Data_length
  8. Max_data_length
  9. Index_length
  10. Data_free
  11. Auto_increment
  12. Create_time
  13. Update_time
  14. Check_time
  15. Collation
  16. Checksum
  17. Create_option
  18. Comment
To get next "Auto Increament" id of table is most of realtime usage of this query. Also, They can know about engine name of the table.

1 comment: