postgresql - SQL query to check if a column within a table has a specific value -
so have table looks this
a | type_id | b | 1 | b lot of more rows ...| ... | ... a2 | 3 | b2
what sql query can write check if type_id has value 3? can't print out table because first 3 might in 1 millionth row or somewhere don't know.
what have far:
select type_id billing.activity order type_id # here?
you need add where
clause in order not worry going through of data , displaying part relevant.
select , b , type_id billing.activity type_id = 3
also, way can think of not
"checking if type has value 3"
but
"checking what rows have type equal 3".
hence, not check, more of filtering of data (displaying want see based on conditions specify).
Comments
Post a Comment