Chris Devers wrote:
> On Tue, 26 Oct 2004, Murphy,  Ged (Bolton) wrote:
> 
> > Going back a few years here, but does an SQL statement not have to
> > end in a semi-colon as above?
> 
> I think it depends on your SQL interpreter.
> 
> The MySQL command line interface `mysql` expect semi-colons, as does
> the `psql` tool for PostgreSQL. I seem to remember that Oracle's
> `sqlplus` did as well, but I'm not sure about other database engines.

Not technically true, at least for psql and SQL*Plus. For instance, in psql
you can run a query without using a semicolon:

   select * from foo
   \g

In SQL*Plus, you can do the same as:

   select * from foo
   /

Using a semicolon in these cases is just a shortcut that means "my statement
is finished; go ahead an execute it". It is not part of the statement itself
and is not sent to the back end, AFAIK.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to