forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Semicolon In History Tab
- This topic is empty.
-
AuthorPosts
-
-
March 21, 2006 at 11:20 pm #9552peterlaursenParticipant
I think the HISTORY tab should conclude each statement with a “;” (semicolon)
Gives less editing when people want to copy from there and 'reuse' it – for instance as code within a SP or a trigger.
Anything that speaks against this?
-
March 22, 2006 at 8:17 am #20949RiteshMember
Not a bad idea.
But with ALTRE SP and all, we need to put the delimiter as $$ and not ;. Basically, we need to add the query in the history box with the delimiter.
-
March 22, 2006 at 8:28 am #20950peterlaursenParticipant
nono, I think … <_< If someone wants to put a lot of ordinary SQL in a Create SP or Create Triger statement it runs somewhat like: DELIMITER $$; CREATE procedure … (….) BEGIN ordinary_SQL_1; — with semicolon! ordinary_SQL_2; ordinary_SQL_3; etc END$$ DELIMITER ;$$ Then they can copy structure from an existing database, do all the changes from GUI on that copy, record 'ordinary_SQL_n's' to HISTORY and copy from HISTORY into Create SP or Create Trigger statement. It simply takes the use of semicolon “;” “;” is always used between BEGIN .. END (and inside cursors too), other DELIMITERS is outside BEGIN .. END
That could be first step in a SP builder GUI (where the copy structure could be transparent to user and where SQL is directly inserted to CREATE PROCEDURE bypassing HISTORY)
-
March 22, 2006 at 8:53 am #20951peterlaursenParticipant
Same thing applies to EVENTS as they also allow for BEGIN .. END's
Actually – even if you copy from HISTORY to SQL-PANE you'll need to add “;”s yourself. No need for that – it could be written to history and will do no harm. For permanent storage in 'favorites', use with SP's etc .. people would want not to have the TIME information. So it should be possible to turn it off.
-
-
AuthorPosts
- You must be logged in to reply to this topic.