MySQL Create Table
Create Table In MySQL by using the create command of MySQL. You have to define the table name and field name with data type and size to create the table.
How to Create Tables in MySQL:
the following syntax is used to Create Table in MySQL:
Create Table in MySQL
You can learn Create Table in MySQL from eitworld.com in easy way with explained examples.
- After creating a database, tables are to be created to insert the data.
- To create a table in MySQL, use CREATE TABLE statement.
- Some of the datatypes that MySQL use are-
- integer- For integer type data. (1, -50, 50, 846 etc.)
- real- For real type data. (2.35, 4e3 etc.)
- text- For plain text.
- char[number]- For fixed number of characters. (char)
- varchar[number]- For variable number of characters. (varchar)
- This statement must be added to php function mysqli_query(), which is used to execute all the queries in MySQL. Queries are discussed in the chapter Introduction to MySQL.
- Before creating a table, a database must be connected. We are connecting the database firstdb and we will create the table inside it.
$table="CREATE TABLE employee(