Create Table Using Another Table

CREATE TABLE new_table_name AS
    SELECT column1, column2,...
    FROM existing_table_name
    WHERE ....;


Example:

CREATE TABLE TestTable AS
SELECT customername, contactname
FROM customers;


Example: 

CREATE TABLE TestTable AS
SELECT customername, contactname
FROM customers WHERE customername='Siti';


Source: https://www.w3schools.com/sql/sql_create_table.asp

Comments

Popular posts from this blog

Lab Network 2024

Step to publish your static html web page to GitHub

Tutorial OOP(reversion java)