Interview Question in Sql Server Views


 

Interview Question :: Cannot Create View in MYSQL - why


Through PHPMyAdmin, I'm able to create tables in my database. However, when I try to create a View using a very simple SQL statement, I get an error!

Here is the statement:
CREATE VIEW myView AS SELECT * FROM utilisateur;

Here is the error message:
#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 myView AS Select * from utilisateur' at line 1


Any ideas? I don't have duplicates names and the table utilisateur does exist. MYSQL is version 4.1.22
Answers to "Cannot Create View in MYSQL - why"
RE: Cannot Create View in MYSQL - why?

Views are a Version 5 feature.
 
Vote for this answer ::  
RE: Cannot Create View in MYSQL - why?

MySQL throws a syntax error the moment it occurs. So the error causing your problem is the word "view". I would suggest updating to the latest version of MySQL which is version 5.0.
 
Vote for this answer ::  
RE: Cannot Create View in MYSQL - why?

post ur all coding here coz which one your 1st line i dont know!
 
Vote for this answer ::  
Update Alert Setting