HI i have these two tables shown below.
CREATE TABLE accounts
(
account INTEGER NOT NULL,
account_type ENUM('single','corporation')NOT NULL,
last_trans_date DATE NOT NULL,
minimum_balance DECIMAL(10,2) NOT NULL,
balance DECIMAL(10,2) NOT NULL,
PRIMARY KEY (account)
);
CREATE TABLE transactions
(
tran_account_number INTEGER NOT NULL,
trans_date DATE NOT NULL,
tran_amount DECIMAL(10,2) NOT NULL,
FOREIGN KEY (tran_account_number) REFERENCES accounts (account)
);
I have updated the date in my accounts table to todays and need to get all of the accounts in the table with todays dates Account number. I then need to use this account number to delete the relevant rows from the transaction table. Only problem is that my version of sql doesn't seem to support foreign keys. ANY ideas people. Thanks Andrew.
CREATE TABLE accounts
(
account INTEGER NOT NULL,
account_type ENUM('single','corporation')NOT NULL,
last_trans_date DATE NOT NULL,
minimum_balance DECIMAL(10,2) NOT NULL,
balance DECIMAL(10,2) NOT NULL,
PRIMARY KEY (account)
);
CREATE TABLE transactions
(
tran_account_number INTEGER NOT NULL,
trans_date DATE NOT NULL,
tran_amount DECIMAL(10,2) NOT NULL,
FOREIGN KEY (tran_account_number) REFERENCES accounts (account)
);
I have updated the date in my accounts table to todays and need to get all of the accounts in the table with todays dates Account number. I then need to use this account number to delete the relevant rows from the transaction table. Only problem is that my version of sql doesn't seem to support foreign keys. ANY ideas people. Thanks Andrew.