0

Hey guys can anyone help me with this i cant run the transaction table it show employee_id invalid identifier...

create table Customer(customer_ID number(30) PRIMARY KEY,fname varchar(30),lname varchar(50),address varchar(50),contact_add number(30),username varchar(30),password varchar(30)); create table Employees(employee_ID number(30) PRIMARY KEY,fname varchar(30),lname varchar(50),address varchar(50),contact_add number,username varchar(30),password varchar(30)); create table Transactions(trans_ID number(30) PRIMARY KEY,FOREIGN KEY(employee_ID) REFERENCES Employees(employee_ID),FOREIGN KEY(customer_ID) REFERENCES Customer(customer_ID),name varchar(30)); create table Logs(logs_ID PRIMARY KEY,FOREIGN KEY(trans_ID) REFERENCES Transactions(trans_ID),login_date varchar(30),login_time varchar(30)); create table Reports(report_ID PRIMARY KEY,FOREIGN KEY(acc_ID) REFERENCES Accounts(acc_ID),FOREIGN KEY(logs_ID) REFERENCES Logs(logs_ID),FOREIGN KEY(trans_ID) REFERENCES Transactions(trans_ID),report_name varchar(30),report_date varchar(30));

25th Feb 2023, 3:32 PM
sabari nathan
sabari nathan - avatar
3 Antworten
+ 3
sabari nathan Instead of copying and pasting the code, save it in Code Playground, then link it in your question description using "+" button. This way, there is no chance of copying mistakes, and people can run and debug your code.
26th Feb 2023, 10:56 AM
Emerson Prado
Emerson Prado - avatar
+ 2
It looks like you are missing the Accounts table in your SQL statement. You need to add a create statement for the Accounts table before creating the Reports table. The Reports table should have a foreign key referencing the Accounts table.
25th Feb 2023, 3:40 PM
Calviղ
Calviղ - avatar
0
Ive created that too forgot to paste it here.... Customer table and employee table got inserted successfully but after i tried to exicute transactions it shows employee ID invalid identifier.... Is anything wrong in this code..?
25th Feb 2023, 4:22 PM
sabari nathan
sabari nathan - avatar