What are projection and selection?

前端 未结 4 1198
遇见更好的自我
遇见更好的自我 2020-11-28 22:38

What is the difference between projection and selection? Is it:

  • Projection --> for selecting the columns of table; and
  • Selection ---> to select the ro
4条回答
  •  孤城傲影
    2020-11-28 23:17

    Exactly.

    Projection means choosing which columns (or expressions) the query shall return.

    Selection means which rows are to be returned.

    if the query is

    select a, b, c from foobar where x=3;
    

    then "a, b, c" is the projection part, "where x=3" the selection part.

提交回复
热议问题