SQLite Forum

How do I create a new table with select?
Login

How do I create a new table with select?

(1) By David Jackson (davidjackson) on 2021-02-16 02:10:00 [link] [source]

Howdy,

Here is what I came up with from the web:

SELECT state,date, new_cases, new_deaths INTO Ohio FROM STATESDAILY WHERE state="Ohio";

TX, David

(2) By Larry Brasfield (larrybr) on 2021-02-16 02:48:11 in reply to 1 [link] [source]

See SQL Tutorial and SQL Syntax.

The first link comes near the top of web search results for: SQL tutorial.

The second link can be reached by intelligently navigating this site's documentation, reached from a well-named link there.

(3) By Keith Medcalf (kmedcalf) on 2021-02-16 03:11:21 in reply to 1 [source]

I don't think you found that associated with SQLite3. Perhaps some other dialects of SQL, but not for SQL as understood by SQLite3.

For SQLite3 use the standard CREATE TABLE AS SELECT.