The SQL CREATE TABLE statement is important in PHP and will be explained in this article.
CREATE TABLE Statement
The CREATE TABLE statement is used for creating tables in the database.
SQL CREATE TABLE Syntax
CREATE Table Table Name
(
Column Name 1 data type,
Column Name 2 data type,
Column name 3 data type,
....
)
SQL CREATE TABLE Instance
This example shows how to create a table named "Person."
The table contains 5 columns with column names: "Id_p", "LastName", "FirstName", "Address", and "City":
CREATE TABLE Persons (id_p int,lastname varchar (255), FirstName varchar (255), Address varchar (255), City varchar (255))
The data type of the id_p column is int, which contains integers. The data type of the remaining 4 columns is varchar, with a maximum length of 255 characters.
This article on its related knowledge to explain, more study material clear concern PHP Chinese network can watch.