Learning Oracle SQL. I have created a table that looks like this:
CREATE TABLE Kocury
(imie VARCHAR2(15) NOT NULL,
plec VARCHAR2(1) CONSTRAINT allowedValues CHECK (plec in ('M', 'D')),
pseudo VARCHAR2(15) Constraint PK_KOCURY PRIMARY KEY,
funkcja VARCHAR2(10) CONSTRAINT fk_checkF REFERENCES Funkcje (funkcja),
szef VARCHAR2(15) CONSTRAINT fk_checkS references Kocury (pseudo),
w_stadku_od DATE default sysdate,
przydzial_myszy NUMBER(3),
myszy_extra NUMBER(3),
nr_bandy NUMBER(2) CONSTRAINT fk_checkN REFERENCES Bandy(nr_bandy)
);`
and then I tried to insert some data:
INSERT INTO Kocury(imie, plec, pseudo, funkcja, szef, w_stadku_od, przydzial_myszy ,myszy_extra, nr_bandy)
VALUES ('JACEK', 'M', 'PLACEK', 'LOWCZY', 'LYSY', '2008-12-01, 67',NULL , 2);
as far as I am concerned the data types all match. But in Oracle SQL Developer I get this:
Error starting at line : 41 in command -
INSERT INTO Kocury(imie, plec, pseudo, funkcja, szef, w_stadku_od, przydzial_myszy ,myszy_extra, nr_bandy)
VALUES ('JACEK', 'M', 'PLACEK', 'LOWCZY', 'LYSY', '2008-12-01, 67',NULL , 2)
Error at Command Line : 42 Column : 1
Error report -
SQL Error: ORA-00947: not enough values
00947. 00000 - "not enough values"
*Cause:
*Action:
I am not sure what's happening and how to get my data inserted. What could I be doing wrong? These topics didn't help me: ORA-00947 : Not Enough Values ORA-00947: not enough values
You're missing some apostrophes in between '2008-12-01, 67'
:
INSERT INTO Kocury(imie, plec, pseudo, funkcja, szef, w_stadku_od, przydzial_myszy ,myszy_extra, nr_bandy)
VALUES ('JACEK', 'M', 'PLACEK', 'LOWCZY', 'LYSY', '2008-12-01', 67, NULL , 2)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With