Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SET @s:=0;
- SELECT `debt`, `credit`, @ s : = (`debt` - `credit`) + @ s AS `balance`
- FROM `recordsdetails`;
- SET @s:=0;
- SELECT debt, credit, @s:=(debt-credit)+@s AS balance FROM recordsdetails;
- SET @s = 0;
- SELECT debt, credit, @s:=(debt-credit)+@s AS balance FROM recordsdetails;
Add Comment
Please, Sign In to add comment