-
Notifications
You must be signed in to change notification settings - Fork 29
Description
Terminal window:
PS C:\DevOps\Python\Learning\Databases> sqlite3
SQLite version 3.46.1 2024-08-13 09:16:08 (UTF-16 console I/O)
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .open test.db
sqlite> CREATE TABLE investments (coin_id TEXT, currency TEXT, anount REAL);
sqlite> .tables
investments
sqlite> .headers on
sqlite> .mode column
sqlite> pragma table_info('investments');
cid name type notnull dflt_value pk
0 coin_id TEXT 0 0
1 currency TEXT 0 0
2 anount REAL 0 0
sqlite> INSERT INTO investments VALUES ('bitcoin', 1.0, 'usd');
sqlite> SELECT * FROM investments;
coin_id currency anount
bitcoin 1.0 usd
sqlite> .exit
PS C:\DevOps\Python\Learning\Databases>
This is a new DB.
When clicking open database this is the error:
"
[9:58:20 AM][vscode-sqlite][INFO] Activating extension vscode-sqlite v0.14.1...
[9:58:20 AM][vscode-sqlite][INFO] Extension activated.
[10:03:05 AM][vscode-sqlite][ERROR] Failed to open database 'c:\DevOps\Python\Learning\Databases\test.db': Parse error near line 4: no such column: "table" - should this be a string literal in single-quotes?
aster WHERE (type="table" OR type="view")
error here ---^
"
