You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@db.apache.org by Soumen Saha <so...@gmail.com> on 2007/10/26 03:53:08 UTC

Default table

Hi,

What is the default table name in Derby? I want to display some fixed data
using SQL like
select '10' as digit
It runs in SQL server. In Oracle I can write in this way
select '10' as digit from dual
but here none of these are working. How can I solve this problem?

-- 
Thanks and Regards,
Soumen Saha
Associate
Cognizant Technology Solutions

Re: Default table

Posted by Soumen Saha <so...@gmail.com>.
Thanks a lot... This is really helpful..

Regards,
Soumen

On 10/25/07, Bryan Pendleton <bp...@amberpoint.com> wrote:
>
> > What is the default table name in Derby? I want to display some fixed
> > data using SQL like
> > select '10' as digit
> > It runs in SQL server. In Oracle I can write in this way
> > select '10' as digit from dual
> > but here none of these are working. How can I solve this problem?
>
> Here's two ways:
>
> 1) Use the "VALUES" statement:
>
>   values cast ('10' as int);
>
> 2) Use SYSIBM.SYSDUMMY1 in place of DUAL:
>
>   select cast('10' as int) from sysibm.sysdummy1;
>
> thanks,
>
> bryan
>

Re: Default table

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> What is the default table name in Derby? I want to display some fixed 
> data using SQL like
> select '10' as digit
> It runs in SQL server. In Oracle I can write in this way
> select '10' as digit from dual
> but here none of these are working. How can I solve this problem?

Here's two ways:

1) Use the "VALUES" statement:

  values cast ('10' as int);

2) Use SYSIBM.SYSDUMMY1 in place of DUAL:

  select cast('10' as int) from sysibm.sysdummy1;

thanks,

bryan