Select specific rows and columns from an SQL database

前端 未结 4 1243
余生分开走
余生分开走 2020-12-10 18:59

Is it possible to retrieve specific columns of specific rows in an SQL query?

Let\'s say I\'m selecting from my SQL table, called my_

4条回答
  •  粉色の甜心
    2020-12-10 19:06

    Try and read the sql, as it really does what it says

    select [column name 1, column name 2] 
    from [table name] 
    where [column name 3] in ('column value 1', 'column value 2')
    order by [column name 3] 
    

    please select the values of "column name 1" and "column name 2" from rows in the table called "table name" where those rows have values equal to 'column value 1' and 'column value 2' in the column called "column name 3"

提交回复
热议问题