-
-
Save RamblingCookieMonster/bc4f2e1bcf1c4a44b03e to your computer and use it in GitHub Desktop.
zSQLite.Init.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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