+ 2

SQL Help

CREATE VIEW TopLevelCust AS SELECT CustomerNum FROM Customer WHERE CreditLimit >= 10000 What am I doing wrong? It should create a view table..

18th Jun 2019, 12:08 AM
Ivan
8 Respostas
+ 6
You have an AS but no alias to assign CREATE VIEW TopLevelCust AS viewName SELECT CustomerNum FROM Customer WHERE CreditLimit >= 10000
18th Jun 2019, 12:11 AM
Jackson O’Donnell
+ 2
I've always used mySQL. Are you making sure to create your tables first? Is there a specific error it is giving you when trying to run?
18th Jun 2019, 1:11 AM
Jackson O’Donnell
+ 2
No but mysql workbench can, its a program you can download to work mysql
18th Jun 2019, 1:25 AM
Jackson O’Donnell
+ 2
Jackson O’Donnell TopLevelCust is the alias. The syntax CREATE VIEW view_name AS SELECT ... FROM ... is correct IMO
18th Jun 2019, 5:54 AM
Anna
Anna - avatar
+ 1
Jackson O’Donnell I tried doing that and it did not work. I am using MS Access, is there a different non-commercial RDMS I can use?
18th Jun 2019, 1:06 AM
Ivan
+ 1
Jackson O’Donnell I have a pre-made database. It pops-up with a Syntax Error on Access, and highlights the VIEW. So I’m just going to download MySQL and go from there. Can MySQL open SQL files?
18th Jun 2019, 1:18 AM
Ivan
+ 1
Okay thank you Jackson O’Donnell
18th Jun 2019, 1:25 AM
Ivan
0
Anna I knew I was doing all of right... To bad it does not work with MS Access I really do not want to download a different DBMS :/
18th Jun 2019, 6:30 AM
Ivan