Start a new db
CREATE TABLE users (email TEXT, name TEXT);
INSERT INTO users (email, name) VALUES ('amir@example.com', 'Amir');
SELECT * FROM users;-
Executing a
SELECTalways returns an array of objects. -
For consistency, all SQL statements return arrays. Statements like
CREATE,INSERTthat don’t retrieve data will return[], an empty array of rows. -
💡 A table can have as many columns as we like. (Within reason: SQLite allows up to 2,000 columns by default, but can be configured to allow as many as 32,767.)
-
💡 SQL keywords like
INSERTandSELECTignore case, soINSERTandInSeRtmean the same thing. Table and column names also ignore case, sousersandUSErsrefer to the same table -
SQL does respect case within strings.
'a'and'A'are different strings that are not equal.