3.7
and later 3.x
versionsJava (Xerial) | |
---|---|
URL format | jdbc:sqlite:database |
Maven Central coordinates | org.xerial:sqlite-jdbc:3.30.1 |
Supported versions | 3.7 and later |
Default Java class | org.sqlite.JDBC |
BEGIN ... END;
block/* Single line comment */
CREATE TABLE test_data (
value VARCHAR(25) NOT NULL PRIMARY KEY
);
/*
Multi-line
comment
*/
-- Sql-style comment
-- Placeholder
INSERT INTO ${tableName} (value) VALUES ('Mr. T');
CREATE TABLE customers(name VARCHAR, address VARCHAR);
CREATE TABLE orders(address VARCHAR, customer_name VARCHAR);
CREATE TRIGGER update_customer_address UPDATE OF address ON customers
BEGIN
UPDATE orders SET address = new.address WHERE customer_name = old.name;
END;
SELECT ... FOR UPDATE
lockingCREATE TRANSACTION
and COMMIT
statements within a migration, as SQLite doesn’t support nested
transactions