mysql - Update row using equation with 2 rows? PHP Mysqli -


i need update row doing subtractions e.g

t1.n1=t1.n1-t2.n2  

i tried this

update table1, table2 set table1.field1 = table2.field1 table1.id = table2.id , triggers 

i have no idea how ? in advance


Comments

Popular posts from this blog

iis - ASP.Net Core CreatedAtAction in HttpPost action returns 201 but entire request ends with 500 -

gcc - Neither ld wrap nor LD_PRELOAD working to intercept system call -

ssh - Vagrant Windows - ssh_exchange_identification: read: Connection reset by peer -