Home Forums SQL Server 2008 T-SQL (SS2K8) Filter Countries, States and Cities which in same row in one table. RE: Filter Countries, States and Cities which in same row in one table.

  • ChrisM@Work (10/8/2013)


    SELECT * FROM TABLE WHERE countryid = @country

    SELECT * FROM TABLE WHERE countryid = @country AND stateID = @stateid

    SELECT * FROM TABLE WHERE countryid = @country AND stateID = @stateid AND Cityid = @Cityid

    totally agree with you Chris.. but i think here OR operator will be more reliable because with correct data

    OR and AND will return same records ..What do you think ?

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)