List:General Discussion« Previous MessageNext Message »
From:Richard Clarke Date:December 24 2002 7:20pm
Subject:Re: 4.1 questions: subqueries which use dual
View as plain text  
Dan,
    According to http://www.mysql.com/doc/en/News-4.1.0.html

    "SELECT ... FROM DUAL is an alias for SELECT .... (To be compatible with
some other databases)."

Your example does work however.

mysql> select * from ( select 1 ) d;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)

Richard.

----- Original Message -----
From: "Dan Nelson" <dnelson@stripped>
To: "Richard Clarke" <ric@stripped>
Cc: "Victoria Reznichenko" <victoria.reznichenko@stripped>; "MySQL"
<mysql@stripped>
Sent: Tuesday, December 24, 2002 6:39 PM
Subject: Re: 4.1 questions: subqueries which use dual


> In the last episode (Dec 24), Richard Clarke said:
> > Victoria,
> >     I pulled that latest updates to the 4.1 tree to make sure I had the
most
> > recent version and I still have the same problem. Here is a log of my
> > actions.
> >
> > # cd /usr/local/mysql-4.1
> > mysql-4.1 # bin/mysql --defaults-file=etc/my-small.cnf -u root
> > Welcome to the MySQL monitor.  Commands end with ; or \g.
> > Your MySQL connection id is 2 to server version: 4.1.0-alpha
> >
> > Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> > Type 'help [[%]function name[%]]' to get help on usage of function.
> >
> > mysql> use mysql;
> > Database changed
> > mysql> select 1 from dual;
> > +---+
> > | 1 |
> > +---+
> > | 1 |
> > +---+
> > 1 row in set (0.00 sec)
>
> I didn't even know Mysql 4.1 had a "dual" table.  I thought that was an
> Oracle-ism.  Does "select * from ( select 1 ) d" work?
>
> --
> Dan Nelson
> dnelson@stripped
>
>
>

Thread
Return every Nth row in a result setSpamSucks8622 Dec
  • RE: Return every Nth row in a result setJamesD22 Dec
  • 4.1 questions: subqueries which use dualric22 Dec
    • re: 4.1 questions: subqueries which use dualVictoria Reznichenko24 Dec
  • Re: Return every Nth row in a result setric22 Dec
    • RE: Return every Nth row in a result setSpamSucks8622 Dec
      • Re: Return every Nth row in a result setBenjamin Pflugmann22 Dec
        • RE: Return every Nth row in a result setSpamSucks8622 Dec
          • Re: Return every Nth row in a result setRichard Clarke22 Dec
          • Re: Return every Nth row in a result setric22 Dec
  • Re: 4.1 questions: subqueries which use dualRichard Clarke24 Dec
    • Re: 4.1 questions: subqueries which use dualDan Nelson24 Dec
  • Re: 4.1 questions: subqueries which use dualRichard Clarke24 Dec
    • Re: 4.1 questions: subqueries which use dualMark Matthews24 Dec