[ 
https://issues.apache.org/jira/browse/DERBY-2261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12481335
 ] 

Kim Haase commented on DERBY-2261:
----------------------------------

Thanks. I think what we're learning is that VALUES can be either a standalone 
statement or a clause within a statement -- sort of like SELECT, which is 
actually documented as both a statement and an expression. Maybe the topic 
should state this explicitly?

It may be that VALUES is called an "expression" precisely because it has this 
flexibility of being either a statement or a clause. So maybe it would make 
sense to stick with "VALUES expression". (Making an extra topic called "VALUES 
statement" would be overkill in this case; the "SELECT statement" and 
"SelectExpression" topics are quite different, but there's a lot less to say 
about VALUES and having two topics seems unnecessary.)

What really confuses me is the whole second sentence: "You use a VALUES 
[whatever] when you do not have a FROM clause." A FROM clause is required in a 
SelectExpression but occurs nowhere else. So there is no chance of replacing a 
FROM clause with a VALUES expression, is there? However, an INSERT statement 
usually consists of either a VALUES expression or a SelectExpression. So might 
it be more accurate to say, "In an INSERT statement, you normally use a VALUES 
expression when you do not use a SelectExpression." ? Or is there something I'm 
not understanding? I'm not a SQL expert.

Thanks for the clarification that it's okay to drop the second vertical bar in 
the syntax.

> Questionable use of word "statement" in VALUES expression of Derby Reference 
> Manual should be changed to "clause"
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: DERBY-2261
>                 URL: https://issues.apache.org/jira/browse/DERBY-2261
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>         Environment: 
> http://db.apache.org/derby/docs/dev/ref/rrefsqlj11277.html
>            Reporter: Tomohito Nakayama
>         Assigned To: Kim Haase
>
> "VALUES statement" in next one sentence in "VALUES expression" of Derby 
> Reference manual should be changed to "VALUES clause".
> >You use a VALUES statement when you do not have a FROM clause.
> http://mail-archives.apache.org/mod_mbox/db-derby-dev/200701.mbox/[EMAIL 
> PROTECTED]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to