Select is a common keyword used to query data. 'select()' is also a programming function for triggering code based on file handle or other system activity. Do not use this tag for questions related to: HTML
In query languages (SQL, …)
SELECT is a statement in query languages, like SQL or SPARQL. It returns a result set of records from one or more tables.
SELECT
queries require two essential parts. The first part is the WHAT, which determines what we want SQL to go and fetch. The second part of any SELECT command is the FROM WHERE. It identifies where to fetch the data from, which may be from a SQL table, a SQL view, or some other SQL data object.
Reference
In HTML
<select>
is also an HTML user interface element for choosing one or more option(s) from a finite collection of elements. Do not use this tag for this purpose, use html-select instead.
In .NET/LINQ
select
is a keyword that can be used for queries on various data sources that implement specific features, directly from language itself. Do not use this tag for such questions, use linq instead.
In C and C++
select()
is an important system call used by C and C++ programs and libraries that avoids busy waiting for network activity and other I/O to complete.
In Perl
In Perl 5, select()
has two different uses. When called with four parameters, it calls the same syscall as C and C++. In this form it has limited portability. Otherwise it is called with one or no parameters and sets or gets current default filehandle for output. The filehandle is used e.g. by print
if no other specified. Special variables like $|
relate to it, too. This second form is perfectly portable.
In Perl 6 it has been completely dropped.
In Go
The select statement lets a goroutine wait on multiple channel operations. A select blocks until one of its cases can run, then it executes that case.