mysql - SELECT column1 FROM table WHERE column2 is greater than column1 -
i want display values of column greater equivalent value in row
like example, display country name population greater country name (i.e. andorra)
select name country population > population (of andorra)
you can use subquery this, e.g.:
select name country population > ( select population country name = 'andorra' );
please note query return error if
- there no record name country name 'andorra' or
- there more 1 record country name 'andorra'
Comments
Post a Comment