Skip to content

Instantly share code, notes, and snippets.

@RamblingCookieMonster
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RamblingCookieMonster/bc4f2e1bcf1c4a44b03e to your computer and use it in GitHub Desktop.
Save RamblingCookieMonster/bc4f2e1bcf1c4a44b03e to your computer and use it in GitHub Desktop.
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