set delimiter

kun6858 posted 6 years ago in Feature discussion
as you already know the character ; is the default delimiter which delimits each SQL query.

but I'd like to set this default to newline character, for instance ("\n") so that i can execute query easily like Toad for oracle.
kun6858 posted 6 years ago
anyone knows about it?
ansgar posted 6 years ago
You can set the delimiter to anything but a newline charactersmileIndeed, that's a limitation of the DELIMITER command, which needs a new line at the end to recognize the delimiter.
kun6858 posted 6 years ago
unhappyOK, dude. thanks
ansgar posted 6 years ago
Hm, did you know you can run the current query where the cursor is located, via Shift+Ctrl+F9 . That's probably what you need.
matsg posted 5 years ago
Follow-up on an old post here, but I just tried setting the delimiter to "go", and unfortunately it matched in the middle of an SQL query, where I created a table called InvoiceCategory. "Cannot create table InvoiceCate", the server responded.

In SQL Server, it is common to create a bunch of statements, delimited with a semicolon, and then use "go" to send it off in one big batch to the server.

I guess this is a bug?
kalvaro posted 5 years ago
Nope, it's just a different syntax. And, as far as I know, `GO` is not even a standard Transact-SQL feature:

SQL Server provides commands that are not Transact-SQL statements, but are recognized by the sqlcmd and osql utilities and SQL Server Management Studio Code Editor. These commands can be used to facilitate the readability and execution of batches and scripts.

SQL Server Utilities Statements

(BTW, I've always wanted to report it as feature request for the SQL Server support in HeidiSQL and never found the time.)
matsg posted 5 years ago
Well, even so, shouldn't I be able to use "go" as a delimiter without it matching in the middle of "InvoiceCategory"?

Please login to leave a reply, or register at first.