ich die folgenden Fehler während einig SQL-Code ausführen:Warum erhalte ich folgende Fehler?
Msg 102, Ebene 15, Status 1, Server WIN-ILO9GLLB9J0, Linie 9
falsche Syntax in der Nähe von 'name'.Msg 102, Ebene 15, Status 1, Server WIN-ILO9GLLB9J0, Zeile 10
falsche Syntax in der Nähe von 'name'.Msg 102, Ebene 15, Status 1, Server WIN-ILO9GLLB9J0, Zeile 11
Falsche Syntax in der Nähe von 'Name'.Msg 102, Ebene 15, Status 1, Server WIN-ILO9GLLB9J0, Zeile 12
Falsche Syntax in der Nähe von "Name".
Mein Code ist wie folgt:
CREATE TABLE city
(
id number(5),
name varchar2(17),
countrycode varchar2(3),
district varchar2(20),
population number(20)
);
INSERT INTO city (id, 'name', 'countrycode', 'district', population)
VALUES (3878, 'Scottsdale', 'USA', 'Arizona', 202705);
INSERT INTO city (id, 'name', 'countrycode', 'district', population)
VALUES (3965, 'Corona', 'USA', 'California', 124966);
INSERT INTO city (id, 'name', 'countrycode', 'district', population)
VALUES (3973, 'Concord', 'USA', 'California', 121780);
INSERT INTO city (id, 'name', 'countrycode', 'district', population)
VALUES (3977, 'Cedar', 'Rapids', 'USA', 'Iowa', 120758);
INSERT INTO city (id, 'name', 'countrycode', 'district', population)
VALUES (3982, 'Coral Springs', 'USA', 'Florida', 117549);
SELECT *
FROM city
WHERE (population > 100000);
Auch: SQL Server hat keinen 'Varchar2()' Datentyp - das ist Oracle. In SQL Server ist es nur 'VARCHAR (n)' ..... –
Oder ein "Zahl" -Datentyp. –