29

I am using LLBLGEN where there is a method to execute a query as a scalar query. Googling gives me a definition for scalar sub-query, are they the same ?

rene
  • 41,474
  • 78
  • 114
  • 152
Cemre Mengü
  • 18,062
  • 27
  • 111
  • 169
  • 3
    My guess, repeat guess, is that it is a query that returns one row with one record. Something like select count(*) from etc. – Dan Bracuk Dec 06 '13 at 13:27

3 Answers3

49

A scalar query is a query that returns one row consisting of one column.

Andomar
  • 232,371
  • 49
  • 380
  • 404
10

For what it's worth:

Scalar subqueries or scalar queries are queries that return exactly one column and one or zero records.

Source

Community
  • 1
  • 1
fwiw
  • 622
  • 11
  • 16
8

A scalar method is used for aggregate functions such as max, min, sum, avg and so on. Whenever you want to return a single value after execute the query.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Aslam Khan
  • 81
  • 1
  • 1