Collections:
Show All Columns of an Existing Table in MySQL
How To Get a List of Columns in an Existing Table in MySQL?
✍: FYIcenter.com
If you have an existing table, but you don't remember what are the columns used in the table, you can use the "SHOW COLUMNS FROM tableName" command to get a list of all columns of the specified table. You can also use the "DESCRIBE tableName" command, which gives you the same output as "SHOW COLUMNS" command. The following tutorial script shows you a good example:
mysql> SHOW COLUMNS FROM tip; +-------------+--------------+------+-----+---------+------- | Field | Type | Null | Key | Default | Extra +-------------+--------------+------+-----+---------+------- | id | int(11) | NO | PRI | | | subject | varchar(80) | NO | | | | description | varchar(256) | NO | | | | create_date | date | YES | | NULL | +-------------+--------------+------+-----+---------+------- 4 rows in set (0.04 sec)
⇒ Show CREATE TABLE Statements of Existing Tables in MySQL
⇐ Show All Tables in a Database in MySQL
2018-03-10, 3191🔥, 0💬
Popular Posts:
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard...
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definit...
How To Find Out What Privileges a User Currently Has in Oracle? Privileges granted to users are list...
What Is a Parameter File in Oracle? A parameter file is a file that contains a list of initializatio...