Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2006
    Posts
    115

    Unanswered: Common Table Expression (CTE) available for MySQL?

    I get to know about CTE through SQL 2005 and it wasn't available for SQL 2000 and earlier version of MS SQL. I intend to use CTE in my stored procedures but am afraid it may not be supported by other non-SQL 2005 databases. Just to make sure I can write an SQL script that most DBMS is able to understand, so just wondering if MySQL is able to support CTE? is it a microsoft thing or open to all?

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    CTEs are part of the SQL-99 standard

    no, mysql doesn't support CTEs, as far as i know
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by r937
    CTEs are part of the SQL-99 standard.
    no, mysql doesn't support CTEs, as far as i know
    Even PostgreSQL does not (yet) support CTEs, to my surprise.
    The only RDBMS of which I know it already supports CTEs are DB2, Oracle and MS-SQLserver.
    Last edited by Peter.Vanroose; 06-23-07 at 09:48.
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

  4. #4
    Join Date
    Mar 2009
    Posts
    24
    Firebird support CTE

    Firebird 2.1 Release Notes

  5. #5
    Join Date
    Nov 2003
    Posts
    2,933
    Provided Answers: 12
    Quote Originally Posted by Peter.Vanroose
    The only RDBMS of which I know it already supports CTEs are DB2, Oracle and MS-SQLserver.
    Oracle does not support the recursive CTE only "regular".

  6. #6
    Join Date
    May 2009
    Posts
    1

    PostgreSQL will have CTR in 8.4

    The current beta of PostgreSQL 8.4 has CTE along with many other nice features.

    Link to description:
    WITH Queries

  7. #7
    Join Date
    Sep 2004
    Location
    Belgium
    Posts
    1,126
    Quote Originally Posted by baest
    The current beta of PostgreSQL 8.4 has CTE along with many other nice features.
    Looks like it even includes recursive SQL! Great!!
    I'm going to download and try out 8.4 A.S.A.P.

    Anyone knows what the MySQL plans are for CTEs?
    --_Peter Vanroose,
    __IBM Certified Database Administrator, DB2 9 for z/OS
    __IBM Certified Application Developer
    __ABIS Training and Consulting
    __http://www.abis.be/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •