Re: SQL comments
От | Tom Allison |
---|---|
Тема | Re: SQL comments |
Дата | |
Msg-id | 448D4125.2020801@tacocat.net обсуждение исходный текст |
Ответ на | Re: SQL comments ("Jaime Casanova" <systemguards@gmail.com>) |
Список | pgsql-novice |
Jaime Casanova wrote: >> Found them, eventually. >> I was trying to insert a comment in the middle of a line: >> >> select status, reason, --method >> from.... >> > > Actually, you can put a comment in the middle of a line. Your mistake > in the above statement is because of the comma before the command, the > parser sees this: > > select status, reason, from .... > > it's completely legal to write: > select status, reason --method > from mytable -- line 2 > OMG!!! I sit and write SQL ~6 hours a day at work on Oracle. There's something wrong with my brain. Writing SQL on postgresql isn't so strange that I should be making such simple mistakes. I do have to figure out all the date/time formats/functions, but that's just a learning curve. Aggregate goodies are a trick as well. I've been picking up some Oracle specific keywords and it's now taking it's toll. Thank you for putting up with my ignorance. I can't promise it won't happen again, but I think I realize just how careful I have to be on my learning curve.
В списке pgsql-novice по дате отправления: