SQL

Hi guys,

I have two fields which I need to compare and show them if the diference is
80% or more?
Can somebody tell me how to this???

Thanks
badboy [ Do, 08 März 2007 18:27 ] [ ID #1651678 ]

Re: SQL

badboy wrote:
> Hi guys,
>
> I have two fields which I need to compare and show them if the diference is
> 80% or more?
> Can somebody tell me how to this???


SELECT * FROM table_name WHERE (column_A * 0.2 >= column_B) OR (column_B * 0.2
>= column_A)


--

//Aho
Shion [ Do, 08 März 2007 19:16 ] [ ID #1651680 ]
PHP » alt.php.sql » SQL

Vorheriges Thema: help with dadabik pull down from foreing key
Nächstes Thema: MySQL join, limiting 1 join only, HELP!