Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
zSQLite.Init.ps1
#Import the module, create a data source and a table
Import-Module PSSQLite
$Database = "C:\Names.SQLite"
$Query = "CREATE TABLE NAMES (
Fullname VARCHAR(20) PRIMARY KEY,
Surname TEXT,
Givenname TEXT,
Birthdate DATETIME)"
#SQLite will create Names.SQLite for us
Invoke-SqliteQuery -Query $Query -DataSource $Database
# We have a database, and a table, let's view the table info
Invoke-SqliteQuery -DataSource $Database -Query "PRAGMA table_info(NAMES)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment