db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satheesh Bandaram <sathe...@Sourcery.Org>
Subject Re: About improvement of DERBY-134
Date Mon, 14 Mar 2005 01:05:51 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Not sure what you mean by <b>the case where you are using VALUES to
construct a table</b>,&nbsp; Derby does allow naming those columns.<br>
<br>
ij&gt; values (1,1,1), (2,2,2);<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|3<br>
-----------------------------------<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|1<br>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|2<br>
ij&gt; select * from (values (1,1,1), (2,2,2)) as t(i,j,k) order by i
desc;<br>
I&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|J&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|K<br>
-----------------------------------<br>
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|2<br>
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|1<br>
<br>
Aren't these symantically the same?<br>
<br>
Satheesh<br>
<br>
Jeremy Boynes wrote:<br>
<blockquote cite="mid4234AB93.8010906@apache.org" type="cite">Yes they
should. <b>Unfortunately that is not always possible and I think the
case where you are using VALUES to construct a table is one of those</b>.
In other words, Tomohito's test is reliant on implementation dependent
behaviour.
  <br>
  <br>
The spec does say that alias names are generated and so it should be
possible to reference them even if doing so is non-portable. Personally
I would prefer the &lt;SQLCol1&gt; form because it is at least a legal
identifier; using &lt;1&gt; would mean having to quote the reference
which seems inconvenient and confusing e.g. ORDER BY "1"
  <br>
  <br>
Whatever the outcome I do think we need to document how the names are
generated so a user can figure it out.
  <br>
  <br>
--
  <br>
Jeremy
  <br>
</blockquote>
</body>
</html>


Mime
View raw message