Overview

To see description, structure, column names and data types of any existing table you can use command Desc table.

Syntax

Syntax for this is

DESC table_name;

Example

Let us see the table hostel_list that we just created in last step

DESC hostel_list;
+----------------+--------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------------+--------------+------+-----+---------+----------------+
| id | int(2) | NO | PRI | NULL | auto_increment |
| name | varchar(100) | NO | | NULL | |
| occupancy_type | tinyint(1) | NO | | NULL | |
| max_capacity | int(4) | NO | | NULL | |
+----------------+--------------+------+-----+---------+----------------+
4 rows in set (0.01 sec)



If you want to add more comments to the article or you see any thing incorrect please write a comment below and we will surely get back to you.



Trending Articles


Incorrect table definition there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Infix To Postfix Conversion Using Stack in Javascript

How to solve IE/Edge CORS error ?

Web Server vs Application Server Difference Explained

How to setup angular2 in visual studio ide

Binary Search Tree Insert node Implementation in Javascript

How to use ninject dependency injection in mvc

How to Add Comparison Feature in Replace in C-Sharp