Home > Database > Mysql Tutorial > 请问一下 mysql数据库,这个SQL应该怎么写?

请问一下 mysql数据库,这个SQL应该怎么写?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:44:39
Original
1261 people have browsed it

mysqlsql

我有两张表
A表:
用户 存款 日期
admin 1000 2014-01-01
admin 1500 2014-01-05

B表
用户 取款 日期
admin 750 2014-01-03
admin 420 2014-01-07

现在想用一句SQL达成以下结果:
用户 事件类型 金额 余额 日期
admin 存款 1000 1000 2014-01-01
admin 取款 750 250 2014-01-03
admin 存款 1500 1750 2014-01-05
admin 取款 420 1330 2014-01-07

请教各位大神 这个SQL应该怎么写?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template