Content deleted Content added
m Use e.g. lower case "select"? Depending for first letter? |
mNo edit summary |
||
Line 99:
Given a table T, the ''query'' {{code|2=sql|1=SELECT * FROM T}} will result in all the elements of all the rows of the table being shown.
With the same table, the query {{code|2=sql|1=SELECT C1 FROM T}} will result in the elements from the column C1 of all the rows of the table being shown. This is similar to a ''[[Projection (relational algebra)|projection]]'' in [[
With the same table, the query {{code|2=sql|1=SELECT * FROM T WHERE C1 = 1}} will result in all the elements of all the rows where the value of column C1 is '1' being shown
With more than one table, the result set will be every combination of rows. So if two tables are T1 and T2, {{code|2=sql|1=SELECT * FROM T1, T2}} will result in every combination of T1 rows with every T2 rows. E.g., if T1 has 3 rows and T2 has 5 rows, then 15 rows will result.
Line 250:
order by {unique_key}
FETCH FIRST {begin_base_0 + rows} ROWS ONLY</syntaxhighlight>
| SQL ANSI 2008<br>
|-
|
Line 299:
OFFSET {begin_base_0} ROWS
FETCH NEXT {rows} ROWS ONLY</syntaxhighlight>
| SQL ANSI 2008<br>
|-
|
Line 306:
order by {unique_key}
LIMIT {rows} OFFSET {begin_base_0}</syntaxhighlight>
| MySQL<br>MariaDB<br>
|-
|
Line 407:
) a
order by {unique_key}</syntaxhighlight>
| SQL ANSI 2008<br>
|-
|
Line 597:
== External links ==
* [http://wwwlgis.informatik.uni-kl.de/cms/fileadmin/courses/SS2008/NEDM/RDDM.Chapter.06.Windows_and_Query_Functions_in_SQL.pdf Windowed Tables and Window function in SQL], Stefan Deßloch
* [
* [
* [
* [
* [
{{SQL}}
|