snippets/old_snippets/temp-sqlite-table.en.md

701 B

title date draft snippet_types
creating a temporary tabel in sqlite 2021-09-21T10:33:46+02:00 false
sqlite
sql

Today I needed to export some data from an sqlite tabel to csv, as part of my poverty line project. Using sqlitebrowser I could see the table had to much data and I only wanted to export a few columns. To accomplish this I learned how to create a temporary table and exported that.

DROP TABLE IF EXISTS processing_data_export;
CREATE TEMPORARY TABLE processing_data_export AS
SELECT x,y, county_id FROM grid;

source: stackoverflow