Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27441

SQL state ment for direct adding and subtructing ???

$
0
0
hello every one ...

my friends i just wanna ask if there is an SQL statement for direct operations like (adding or subtracting values ) for a specific record ???
for ex : i have a "price" record in my DB which its value is 5000$ and some how i have to subtract 1500$ from this price so the new record will be 3500$ instead of the 5000$ can i do this with one sql statement or i have to make a Query to get the 500$ and assign it to variable and make the subtraction and reINSERT it to the DB ??
i'm lopking for somthing like "update products set price -1500 where prod ='"& combobox1.text &"'",con" .......

thanks ^_^

Viewing all articles
Browse latest Browse all 27441

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>