Advertisement
cydside

CREATE TABLE IF NOT EXISTS

May 19th, 2024 (edited)
1,079
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.38 KB | None | 0 0
  1. CREATE TABLE [IF NOT EXISTS] [schema_name].TABLE_NAME (
  2.     column_1 INTEGER PRIMARY KEY,
  3.     column_2 INTEGER NOT NULL,
  4.     column_3 REAL DEFAULT 0,
  5.     column_4 TEXT,
  6.     column_5 BLOB DEFAULT NULL,
  7.     table_constraints
  8. ) [WITHOUT ROWID];
  9.  
  10. CREATE TABLE IF NOT EXISTS t (a INTEGER PRIMARY KEY, b INTEGER NOT NULL, c REAL DEFAULT 0, d TEXT, e BLOB DEFAULT NULL);
  11.  
  12. DROP TABLE IF EXISTS t;
Tags: sqlite
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement