Create View Statements

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Balance

    Create View Statements

    How do I create a view?

    I've read the help page on the mysql.org site but still cannot get

    create view employee as select emp.name from emp, dept where
    dept.id=emp.dep t;

    The select statement works fine on its own and I've changed the view name
    a couple of times to avoid reserved words but still get Error 1064 : you
    have an error in your sql syntax near... which leaves me none the wiser.

    Clearly missing something obvious - please put me back on track.Thanks
  • Justin C. Le Grice

    #2
    Re: Create View Statements

    Balance wrote:
    [color=blue]
    > How do I create a view?
    >
    > I've read the help page on the mysql.org site but still cannot get
    >
    > create view employee as select emp.name from emp, dept where
    > dept.id=emp.dep t;
    >
    > The select statement works fine on its own and I've changed the view name
    > a couple of times to avoid reserved words but still get Error 1064 : you
    > have an error in your sql syntax near... which leaves me none the wiser.
    >
    > Clearly missing something obvious - please put me back on track.Thanks[/color]

    Isn't the lack of views being addressed in the next major version of mySQL ?

    Perhaps thats why your statement doen't work.

    Comment

    • Justin C. Le Grice

      #3
      Re: Create View Statements

      Balance wrote:
      [color=blue]
      > How do I create a view?
      >
      > I've read the help page on the mysql.org site but still cannot get
      >
      > create view employee as select emp.name from emp, dept where
      > dept.id=emp.dep t;
      >
      > The select statement works fine on its own and I've changed the view name
      > a couple of times to avoid reserved words but still get Error 1064 : you
      > have an error in your sql syntax near... which leaves me none the wiser.
      >
      > Clearly missing something obvious - please put me back on track.Thanks[/color]

      Isn't the lack of views being addressed in the next major version of mySQL ?

      Perhaps thats why your statement doen't work.

      Comment

      • Justin C. Le Grice

        #4
        Re: Create View Statements

        Balance wrote:
        [color=blue]
        > How do I create a view?
        >
        > I've read the help page on the mysql.org site but still cannot get
        >
        > create view employee as select emp.name from emp, dept where
        > dept.id=emp.dep t;
        >
        > The select statement works fine on its own and I've changed the view name
        > a couple of times to avoid reserved words but still get Error 1064 : you
        > have an error in your sql syntax near... which leaves me none the wiser.
        >
        > Clearly missing something obvious - please put me back on track.Thanks[/color]

        Isn't the lack of views being addressed in the next major version of mySQL ?

        Perhaps thats why your statement doen't work.

        Comment

        Working...