Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Table Help how to configure

$
0
0
I have table like this-

CREATE TABLE IF NOT EXISTS `bank` (
`BANK_ID` int(3) NOT NULL AUTO_INCREMENT,
`T_DATE` date NOT NULL,
`PARTICULAR` varchar(25) DEFAULT NULL,
`DEPOSIT` int(6) NOT NULL DEFAULT '0',
`WITHDRAWL` int(6) NOT NULL DEFAULT '0',
`BALANCE` int(6) NOT NULL DEFAULT '0',
PRIMARY KEY (`BANK_ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;


where balance is calculated value. it will be calculated as follows-
balance = balance +deposit or balance-withdrawal depending upon whether it is deposited or withdrawn. Deposit or withdrawal can happen multiple times in a day . whether it will be easy using trigger or any other way. Please help.
Thanks .

Viewing all articles
Browse latest Browse all 13329

Trending Articles