Hi
I have in my table two fields one named preco_custo and other named preco_venda. Is possible in my sql evaluate the difference between this 2 fields. I need a sal like
$query ="select nome, venda, preco_custo-preco_venda from negocios"
Any ideas?
Thank you
Field operation in sql query
Moderator: General Moderators
-
mariolopes
- Forum Contributor
- Posts: 102
- Joined: Sun May 22, 2005 7:08 am
Re: Field operation in sql query
Yes.
$query ="select nome, venda, preco_custo-preco_venda AS `diff` from negocios"
$query ="select nome, venda, preco_custo-preco_venda AS `diff` from negocios"
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
-
mariolopes
- Forum Contributor
- Posts: 102
- Joined: Sun May 22, 2005 7:08 am
Re: Field operation in sql query
Thank you
That's what I need
That's what I need