Anda tampaknya mencoba mendeklarasikan kunci asing sebaris dan sintaksnya salah, Anda ingin:
CREATE TABLE B_BOOKING (
booking_number int PRIMARY KEY,
date_booked date,
performance_order int,
base_pay int,
band_number int,
concert_number int REFERENCES B_CONCERT(concert_number)
)
Juga, Anda tidak memerlukan NOT NULL
batasan pada PRIMARY KEY
kolom.
Atau Anda dapat mendeklarasikan batasan sebagai:
CREATE TABLE B_BOOKING (
booking_number int PRIMARY KEY,
date_booked date,
performance_order int,
base_pay int,
band_number int,
concert_number int,
CONSTRAINT constraint_name FOREIGN KEY ( concert_number )
REFERENCES B_CONCERT(concert_number)
)