lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Apr 30, 2014, at 3:58 PM, Pierre Chapuis <catwell@archlinux.us> wrote:

> Doesn't BEGIN exist in SQL?

Depends by what you mean by ‘SQL’… if referring to something like the formal ANSI syntax, e.g. SQL-92 & co, both ‘begin’ and ‘end’ are defined:

http://savage.net.au/SQL/sql-92.bnf.html#xref-BEGIN
http://savage.net.au/SQL/sql-92.bnf.html#xref-END

But in common use DML, one will seldom encounter ‘begin’, if ever. On the other hand, ‘end’ is rather common , e.g. 'case when … end’…

On the other hand, if you extend your definition of ‘SQL’ to procedural constructs such as PL/SQL, then of course your ‘SQL’ code will be littered  with ‘begin … end’ all over the place.