Unable to execute only one line of code in the project.sqlite area

I included the link of the page where I’m currently working, but this applies to any page in SQL on which I’ve written statements.

As I work through several - or even a dozen or more - tasks, and accumulate more statements to process, I find myself having to comment-out previous statements because I’m unable to execute only the statement where my cursor is. I’d like to execute only the statement where I have my cursor, but the entire contents of the project.sqlite is executed even when I just want to execute just one statement.

If there is a way to execute only one statement - among many statements in the coding area - at a time, I’m missing it. Please let me know if this is doable, because commenting-out every block of code so that I don’t see the results of many statements every time I want to run just one line of code is frustrating.


Are you commenting out the previous queries?
Rather than doing that, you could cut the code that you’re not running and paste it in a code editor or document, and then run your latest query.

Thank you for responding. I’m commenting out previous queries just to avoid every query running every time I want to run only the latest one. Cutting out previous queries and pasting it somewhere else could work, although it sounds more involved than commenting out all previous queries, and adding to that commented-out code block as I proceed through tasks. I was only hoping that there was a way to run only the statement at my cursor, but apparently that’s not possible.

I seem to recall that I also commented out each of my previous queries too so all of them didn’t run. I commented out each one separately, rather than one big block of code. Did you try that?

Hi, thank you very much for responding.

I was commenting out blocks of code, one “task” at a time, for a given exercise.

This isn’t bad for an exercise with 3 or 4 tasks. When it becomes more involved, as in a project, I switch to putting all previous queries - that is, previous to whatever task I happen to be working on - between /* and */ for one huge commenting-out. Just worked out easier that way. That’s where I’m at now. I guess I was just surprised that the ‘Save’ button, which executes every statement in the coding area, was the only way to run a statement. I thought there might be a way to just select a specific statement and run only that. No biggie. There are bigger fish to fry…