SQLite¶
To enter the SQLite database, use the following command:
To view the tables in the database, use the following SQL command:
To exit the SQLite database, use the following SQL command:
To execute an SQL script, use the following command:
To delete a column from a table, follow these steps:
ALTER TABLE xxx RENAME TO yyy; -- Rename the table
.read new_xxx.sql -- Create a new table without the column
INSERT INTO xxx SELECT * FROM yyy; -- Copy data from the renamed table to the new table
DROP TABLE yyy; -- Drop the renamed table
Last update: September 16, 2023