db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bernt M. Johnsen" <Bernt.John...@Sun.COM>
Subject Re: Documentation Style Issue - semi-colon at the end of SQL statement examples
Date Tue, 22 Aug 2006 08:03:26 GMT
Details from the standard (maybe I'm just nit-picking.... ;-)

Semicolon in SQL is used
1) After statements in trigger and procedure bodies (we don't support this)
2) In various embedded SQL variants (Statements are terminated with
semicolon when SQL is embedded in Ada, C, Pascal, PL/I. Declarations is
terminated with semicolon when SQL is embedded in C and MUMPS... etc)
3) A "direct SQL statement" is terminated by semicolon (as in ij)

I think semicolon should *only* be used in examples when the standard
requires a semicolon. And that is basically exactly what Army and Knut
Anders points out.

Knut Anders Hatlen wrote:
> Laura Stewart <scotsmatrix@gmail.com> writes:
> 
>> Hi -
>> Should there be a semi-colon at the end of the SQL statement examples
>> in the Derby documentation.  In other documentation work that I have
>> done, this was the standard. I just wanted to check with the Derby
>> community to see what is appropriate for the Derby docs.
> 
> If the example is shown in ij, it should be there. If it is just an
> example SQL statement, I think it should be written without a
> semicolon.
> 


-- 
Bernt Marius Johnsen, Database Technology Group,
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway


Mime
View raw message