Sqlite Visual Studio Code



Extension for Visual Studio - SQLite / SQL Server Compact Toolbox extension for Visual Studio. This extension adds several features to help your embedded database development efforts: Scripting of tables and data, import from SQL Server and CSV files and much, much more.

Transcript from the 'Working with SQLite' Lesson

Django Tutorial in Visual Studio Code. Django is a high-level Python framework designed for rapid, secure, and scalable web development. Django includes rich support for URL routing, page templates, and working with data. VSCode extension to explore and query SQLite databases. No requirements. Note: The extension includes binaries for the SQLite CLI (used to execute queries), in case the included binaries do not work you need to provide your own path/command for the sqlite3 CLI in the setting sqlite.sqlite3. Query SQLite databases and view results in a table. Just install the sqlite extension in your visual studio code: VSCode-SQLite; Then you can right-click on the database file and click 'Open Database'. SQLite database in visual studio code; Expand the database. Expanded sqlite database in vscode; Click the play button in front of each table to view table contents. SQLite table in visual studio code.

[00:00:00]
>> Burke Holland: So let's take a look at how we can use SQLite within VS Code. What I need to do first is, I want to open a terminal instance. And then from here, what we need to do is we need to create a data directory. And I've actually already got one, so I'm gonna say, remove the data directory.

[00:00:24] We'll start from scratch. By the way, if you're on a Mac, and you didn't know, Cmd+K clears out the screen. Also, Ctrl+U clears off the current line. Cmd+K, Ctrl+U, those are magical commands if you're on Bash. So let's create a data directory. And then we're gonna move into that directory.

Sqllite visual studio code

[00:00:49] And you can see it appeared over here. I don't know if you saw but it's now in the Explorer. So I'm gonna say sqlite3. And because I've already included that, this command is just gonna run. And I'm gonna say lamp.db. And I'm gonna run this, and I'm gonna just hit databases to make sure that it's there.

[00:01:07] There it is. And I'm gonna quit. If we do a list now, we see we have a lamp.db file. So we can now start interacting with this file from VS Code because it is a valid SQLite database. So let's do this. Cmd+Palette, Ctrl, Cmd+Shift+P, SQLite. And we're gonna say, open database.

[00:01:34] And it's gonna wanna know which one. It automatically picked up this one, we'll select that. And now we have a SQLite Explorer over here. And inside is our database. And what we can do here is run a new query. And let's do some things here. So let's do, let's go back to the Explorer from my workspace.

Sqlite Python Visual Studio Code

[00:01:57] Let's run some SQL here. So what I'm gonna do is create a table called colors. So we'll do this and we can run this. So we highlight it and we say, sqlite, run selected query. Boom. Okay, and now let's do, let's insert. In fact, let's grab both of these items.

[00:02:19] Let's highlight just this line, run selected query, okay? And then let's highlight just this line, run selected query. There we go. All right, and now we're getting data back from SQLite. So you can see if you have a SQLite database in your project, you can use it directly from VS Code.

[00:02:42] And you can interact with it without ever leaving your editor, which is pretty cool. I wanna do one more just to show you what's possible. There are other possible database options. The other one that we see quite a lot, quite a bit of use from is MySQL. A lot of people use MySQL.

Sqlite Visual Studio Code Tutorial

Visual

Sqlite Visual Studio Code Free

[00:02:58] I've given you an entire MySQL database as part of this dev container. I'm sorry in advance to the Internet here. So, whether or not you have MySQL installed, you will have to open this project.