About 739,000 results
Open links in new tab
  1. SQL CREATE TABLE Statement - W3Schools

    The CREATE TABLE statement is used to create a new table in a database. .... The column parameters specify the names of the columns of the table. The datatype parameter specifies the type of data the column can hold (e.g. varchar, integer, date, etc.). Tip: For an overview of the available data types, go to our complete Data Types Reference.

  2. SQL CREATE TABLE (With Examples) - Programiz

    In SQL, the CREATE TABLE statement is used to create tables. In this tutorial, we'll learn about creating tables in SQL with examples. Learn to code solving problems and writing code with our hands-on SQL course.

  3. SQL CREATE TABLE - GeeksforGeeks

    Apr 14, 2025 · In SQL, creating a table is one of the most essential tasks for structuring your database. The CREATE TABLE statement defines the structure of the database table, specifying column names, data types, and constraints such as PRIMARY KEY, NOT NULL, and CHECK.

  4. SQL CREATE TABLE Keyword - W3Schools

    The CREATE TABLE command creates a new table in the database. The following SQL creates a table called "Persons" that contains five columns: PersonID, LastName, FirstName, Address, and City: The following SQL creates a new table called "TestTables" (which is a copy of two columns of the "Customers" table): SQL Keywords Reference.

  5. SQL CREATE TABLE Statement - SQL Tutorial

    To create a new table, you use the CREATE TABLE statement. Here’s the basic syntax of the CREATE TABLE statement. column1 datatype constraint, column2 datatype constraint, ... In this syntax: table_name is the name of the table you want to create. column1, column2, … are the column names of the table.

  6. SQL CREATE TABLE Statement with Practical Examples

    Nov 4, 2022 · Here is the syntax to be used with SQL CREATE TABLE with SELECT statement: CREATE TABLE table_name [AS] SELECT * FROM exist_table ; CREATE TABLE table_name AS (SELECT column1_name, column2_name, column3_name...

  7. SQL create table - w3resource

    Apr 20, 2024 · Here are some important points and tips about the "SQL CREATE TABLE" statement: Table Name: Choose a descriptive and relevant name for your table. It should reflect the entity or concept it represents. Column Definitions: Define each column in the table with its name and data type.

  8. SQL Create Table Statement - With Example Syntax

    Jul 21, 2020 · Let's start with a simple statement to create a basic table: column1_name datatype, . column2_name datatype, column3_name datatype, column4_name datatype, column5_name datatype,) There are other parameters we can add after the datatype to augment the columns: UNIQUE KEY - passing this parameter will designate that column as a unique identifier.

  9. SQL CREATE TABLE Statement - Tutorial Republic

    To understand this syntax easily, let's create a table in our demo database. Type the following statement on MySQL command-line tool and press enter: id INT NOT NULL PRIMARY KEY AUTO_INCREMENT, name VARCHAR(50) NOT NULL, birth_date DATE, phone VARCHAR(15) NOT NULL UNIQUE. id INT NOT NULL PRIMARY …

  10. SQL Create Table - DigitalOcean

    Aug 4, 2022 · When we have to store data in relational databases, the first part is to create the database. Next step is to create a table in the database that will store our data. In this tutorial, we will discuss how to create a table using SQL queries in MySQL and PostgreSQL databases.

  11. Some results have been removed