Error question creating view.

Asked 2 years ago, Updated 2 years ago, 58 views

CREATE VIEW C_R AS
SELECT LICENSEPLATE, CARNAME, CARMODEL, CARCOM, CONDITION, FUEL, RENT, PASSENGER, DISTANCE
FROM CAR_RELATIONS CR, CAR CA, CARMODEL CM, CARCOM CO, PASSENGER PG, RENT RT, FUEL FL, CONDITION CN, DISTANCE DE
WHERE CM.CARMOCODE = CA.CARMOCODE, CO.CARCOMCODE = CA.CARCOMCODE, CA.CARCODE = CR.CARCODE, DE.DTCODE = CR.DTCODE, CN.CDCODE = CR.CDCODE, FL.FCODE = CR.FCODE, RT.RCODE = CR.RCODE, PG.PASSENGERCODE = CR.PASSENGERCODE;
Error Report -
SQL Error: ORA-00933: SQL command not terminated correctly
00933. 00000 -  "SQL command not properly ended"
*Cause:    
*Action:

I'm asking you this question because I don't know the reason why there are errors in grammar or Samcolon.

sql oracle database erd

2022-09-21 10:52

1 Answers

In the WHERE section, use the AND or operator between conditions and conditions, not comma , :

SELECT *
FROM DUAL
WHERE 1 = 1
AND 2 = 2
OR 3 = 3


2022-09-21 10:52

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.