Content deleted Content added
mNo edit summary |
m Use e.g. lower case "select"? Depending for first letter? |
||
Line 1:
The [[SQL]] '''SELECT''' statement returns a [[result set]] of records, from one or more [[Table (database)|tables]].<ref>{{cite web |url=http://msdn2.microsoft.com/en-us/library/ms189499.aspx |title=Transact-SQL Syntax Conventions |accessdate= |author=Microsoft }}</ref><ref>{{cite web |url=http://dev.mysql.com/doc/refman/5.0/en/select.html|title=SQL SELECT Syntax |accessdate= |author=MySQL}}</ref>
A '''SELECT''' statement retrieves zero or more rows
The SELECT statement has many optional clauses:
Line 316:
|-
|
<syntaxhighlight lang="tsql">
*, _offset=identity(10)
into #temp
Line 339:
<syntaxhighlight lang="tsql">select TOP {rows} *
from (
select *, ROW_NUMBER() over (order by {unique_key}) as _offset
from {table}
) xx
Line 400:
<syntaxhighlight lang="tsql">select *
from (
from {table}
where {unique_key} < {first_val}
|