Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQlite: select into?

Tags:

sql

sqlite

I'm not sure if I can use select into to import data from another table like this:

select * into   bookmark1  from bookmark;     

Is it true that SQlite doesn't support this syntax? are there any other alternatives?

like image 286
Glaucon Avatar asked Jan 08 '10 12:01

Glaucon


People also ask

Does SQLite support select into?

1 Answer. SELECT INTO isn't supported by SQLite.

How do I select specific data in SQLite?

To select data from an SQLite database, use the SELECT statement. When you use this statement, you specify which table/s to select data from, as well as the columns to return from the query. You can also provide extra criteria to further narrow down the data that is returned.

When we use select into?

The SELECT INTO statement is a query that allows you to create a new table and populate it with the result set of a SELECT statement . To add data to an existing table, see the INSERT INTO statement instead. SELECT INTO can be used when you are combining data from several tables or views into a new table.

What is the use of select into in SQL?

SELECT... INTO creates a new table in the default filegroup and inserts the resulting rows from the query into it. To view the complete SELECT syntax, see SELECT (Transact-SQL).


1 Answers

You could do:

create table bookmark1 as select * from bookmark; 
like image 67
vit Avatar answered Oct 02 '22 20:10

vit