Home  >  Article  >  Database  >  How to create a table in sql database?

How to create a table in sql database?

藏色散人
藏色散人Original
2019-05-13 13:30:5073905browse

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 数据类型,
.......
)

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
)

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!

Statement:
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