lyl
lyl

Reputation: 293

How to run a sqlite script from Emacs

I'd like to edit a sqlite script in an emacs buffer. I wonder how to run this script(or buffer) from emacs. Any good idea for this? Thanks.

Upvotes: 1

Views: 816

Answers (1)

Alex Ott
Alex Ott

Reputation: 87069

sqlite is supported out of box in the built-in sql-mode that is automatically enabled for files with .sql extension. You can press M-x sql-sqlite to get access to your sqlite database.

After that you can use commands like C-c C-r to send the region to interpreter and see the results (there are also other commands like send paragraph, send buffer, etc. - see them in the SQL menu.

EmacsWiki has a page about this mode where you can find more recipes, etc.

Upvotes: 2

Related Questions