What is a "Scalar" Query?

19,702

Solution 1

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

Solution 2

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.

Solution 3

For what it's worth:

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

Source

Share:
19,702

Related videos on Youtube

Cemre Mengü
Author by

Cemre Mengü

I try and catch

Updated on September 14, 2022

Comments

  • Cemre Mengü
    Cemre Mengü over 1 year

    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 ?

    • Dan Bracuk
      Dan Bracuk over 10 years
      My guess, repeat guess, is that it is a query that returns one row with one record. Something like select count(*) from etc.