Home > Database > Mysql Tutorial > body text

How to create a table in sql database?

藏色散人
Release: 2020-09-14 16:40:58
Original
73908 people have browsed it

In the sql database, you can create a table through the syntax [CREATE TABLE table name (column name 1 data type, column name 2 data type,...)].

How to create a table in sql database?

SQL is the abbreviation of Structured Query Language. SQL is a set of operation commands specially built for databases and is a fully functional database language. When using it, you only need to issue the command "what to do", and the "how to do it" does not need to be considered by the user. SQL is powerful, easy to learn, and easy to use. It has become the basis for database operations, and almost all databases now support SQL.

How to create a table in sql database?

Sql database syntax for creating a table:

CREATE TABLE 表名称
(
列名称1 数据类型,
列名称2 数据类型,
.......
)
Copy after login

Example

This example demonstrates how to create a table named "Person" with four columns. The column names are: "LastName", "FirstName", "Address" and "Age":

CREATE TABLE Person 
(
LastName varchar,
FirstName varchar,
Address varchar,
Age int
)
Copy after login

The above is the detailed content of How to create a table in sql database?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template