SQL Filter to not display some items in a table

1

Good morning! all beauty On the site I'm moving, it displays a list of countries that come from the database. However, there was a requirement that OFAC-sanctioned countries should not be exhibited.

It calls countries with the following SQL commands:

 var sql = @"
        SELECT
            id, nome_pt AS nome
        FROM loc_pais
        ORDER BY nome_pt
    ";

My doubt is; "can I put a filter to not display those countries that are sanctioned, or would it be better to exclude them from the table?"

    
asked by anonymous 24.09.2018 / 16:20

1 answer

6

If it does not, include a column in the "loc_pais" table of type "bit", for example "sancionado_ofac" and update the table with which countries are sanctioned ( sancionado_ofac=1 ). Then just add where sancionado_ofac = 0 to your query

    
24.09.2018 / 16:24