I have been trying to get this thing working for a few day now (foreign key) and it just don't work, and feel like every solution I used don't work, so i'm asking here to learn what was the problem and how to fix it

Table creation :

```
CREATE TABLE CUSTOMER
(
Customer_ID varchar(255) NOT NULL,
Customer_Name varchar(50),
Customer_Gender varchar(10),
Customer_DOB varchar(20) ,
CONSTRAINT CUSTOMER_PK PRIMARY KEY(Customer_ID)

) ; 

```

```
CREATE TABLE PAYMENT
(
Payment_ID varchar(255) NOT NULL,
Cust_ID varchar(255),
Payment_Method varchar(30),
Payment_Date varchar(20),
Payment_Total NUMBER(10,2) ,
CONSTRAINT PAYMENT_PK PRIMARY KEY(Payment_ID),
CONSTRAINT fk_customer FOREIGN KEY(Cust_ID) REFERENCES CUSTOMER(Customer_ID)
) ; 

```

Inserting values :

```
INSERT INTO CUSTOMER VALUES ('1277','Jenny','Female',    ( TO_Date ( '03/04/1988' , 'DD/MM/yyyy')));
INSERT INTO CUSTOMER VALUES ('3423','Bryan','Male',      ( TO_Date ( '15/06/1990' , 'DD/MM/YYYY')));
INSERT INTO CUSTOMER VALUES ('4385','Mohd Shafik','Male',( TO_Date ( '20/08/1993' , 'DD/MM/YYYY')));

```

```
INSERT INTO PAYMENT VALUES ('24P','Cash',            ( TO_Date ( '11/02/2022' , 'DD/MM/YYYY')),24.50);
INSERT INTO PAYMENT VALUES ('09p','Online Transfer', ( TO_Date ( '08/04/2022' , 'DD/MM/YYYY')),25.00);
INSERT INTO PAYMENT VALUES ('10P','Cash',            ( TO_Date ( '08/07/2022' , 'DD/MM/YYYY')),22.50);

```

The foreign keys are now working , but just for life of me can't figure out why the it spits out ORA-00947: not enough values and

ORA-01400: cannot insert NULL into ("SQL\_GUUNNGDQAOXJVYPBKNMILVXJR"."PAYMENT"."PAYMENT\_ID") ORA-06512: at "SYS.DBMS\_SQL", line 1721

Also, Please explain to me how references works, i read a few places but they use words that just confuse me. Please and thank you!