It's behaving the same as SQL*Plus does. You've entered one line of text into the command buffer but you haven't told the client that it's a complete statement or told it to execute it. It's showing the line number prompt to show it's expecting more input.
You can either end the statement with a semicolon, or put a slash (/
) on a new line on its own; from that documentation:
Ending a SQL Command
You can end a SQL command in one of three ways:
- with a semicolon (;)
- with a slash (/) on a line by itself
- with a blank line
A semicolon (;) tells SQL*Plus that you want to run the command. Type the semicolon at the end of the last line of the command ... and press Return or click Execute. SQL*Plus processes the command and also stores the command in the SQL buffer. ... If you mistakenly press Return before typing the semicolon, SQL*Plus prompts you with a line number for the next line of your command. Type the semicolon and press Return again or click Execute to run the command.
A slash (/) on a line by itself also tells SQL*Plus that you wish to run the command. Press Return at the end of the last line of the command. SQL*Plus prompts you with another line number. Type a slash and press Return again or click Execute. SQL*Plus executes the command and stores it in the buffer.
SQL Devleoper supports these too, using a semicolon (by default) as the SQL termination character, and allowing that or a slash to terminate a statement. It allows you to omit it from the last statement in a script though, which SQL*Plus doesn't - the statement will never be run in that case. I think SQLcl behaves the same as SQL*Plus for that too.
(I realise SQLcl is not exactly the same, but most of the SQL*Plus documentation applies to SQL Developer and to its more recent sibling SQLcl. You can read more about it at ThatJeffSmith's blog.)