Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2006
    Location
    NY
    Posts
    14

    Unanswered: simple create view

    Hi guys,
    I'm using mysql and for the first time I'm trying to create view in order to facilitate my querys.

    I consulted the mysql website with ref to views at:
    http://dev.mysql.com/doc/refman/5.0/en/create-view.html

    but the most simple statement that i write:

    CREATE VIEW testing AS
    SELECT * FROM empl WHERE id>864

    returns a 1064 ERROR:
    [root@localhost:3306] ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW ...


    does anyone know what am I doing wrong?

  2. #2
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Since it is complaining about the VIEW keyword, what version of mysql are you using? You need version 5.0 if you built this yourself and version 5.0.1 if you are using a pre-built binary.

  3. #3
    Join Date
    Jun 2006
    Location
    NY
    Posts
    14
    I'm using 4.1.9 does that present a problem?

  4. #4
    Join Date
    Apr 2006
    Location
    Denver, Co. USA
    Posts
    242
    Yes, VIEW is not available until version 5.

Posting Permissions

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