1

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.

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your solution. And I set up a file with .sql extention. Then I tried your way, but find that all send... commands in the SQL menu are in grey which means unaccessible. How to deal with that?
You need to execute M-x command first to open a session

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.