如果表的主键或惟一性约束中指定了这个列,那么不允许使用这个子句(SQLSTATE 42831)。
This clause is not allowed if the column is specified in the primary key, or in a unique constraint of the table (SQLSTATE 42831).
因此,您常常可以选择实现只包括在WHERE和ORDERBY子句中引用到的列的索引。
Therefore, you may often choose to implement indexes that include only the columns referred to in the WHERE and ORDER BY clauses.
创建索引所需的查询将发生变化以在where子句中包括这个新列。
The query needed to create the index would change to include this new column in the WHERE clause.
WITH ORDINALITY子句使UNNEST生成另一个整数类型的列,包含与每一个元素关联的位置。
The WITH ORDINALITY clause causes UNNEST to generate an additional column of type integer that contains the position associated with each element.
DB 2依据时态表的开始和结束列中使用的数据类型,使用合适的where子句谓词自动重写查询。
DB2 automatically rewrites the queries with appropriate WHERE clause predicates depending on the data types used in the start and end columns of the temporal tables.
通过BLOB数据类型或使用FORBITdata子句定义的列将以二进制形式从源传递到目标,所使用的代码页是零。
Columns defined with the BLOB data type, or using the FOR BIT data clause will be passed as binary from the source to the target, and the code page used is zero.
类似于在常规的ORDERby子句中,可以按升序或降序指定多个列。
Like in a regular ORDER BY clause multiple columns can be specified in either ascending or descending sequence.
WHERE 子句最简单最常见的用法是在选择任意列之前过滤表中的行,如 清单4 所示。
The simplest and most common use of the WHERE clause is to filter the rows from a table before selecting any columns, as demonstrated in Listing 4.
除列指定之外,外部表的创建还包含一个using子句。
Creation of external tables also includes a USING clause in addition to the column specification.
还可以使用As子句命名查询中的选定列,从而允许您控制如何显式结果,这也在下一节中讲述。
You can also use an AS clause to name the selected columns in a query. Doing so lets you control how the results are displayed, which is also demonstrated in the next section.
这个子句允许通过附加额外的列来扩展oldTABLE或NEW TABLE过渡表。
This clause allows you to extend the OLD table or NEW table transition tables by appending extra columns.
可在ORDERBY 子句中使用伪列LEVEL按照搜索宽度优先顺序返回结果集。
The pseudo column LEVEL can be used in the ORDER BY clause to return the result set in search breadth first sequence.
指定生成的GROUPBY子句中包括的列,如图13所示。
Specify the columns to be included in the generated GROUP BY clause, as shown in Figure 13.
分区键应该由常用于GROUPBY子句的列组成。
The partitioning key should be made up of columns that often participate in a GROUP BY clause.
SELECT子句含有来自表中的所有列(完全行复制)
The SELECT clause has all the columns from the tables (full row replication)
注意:这相当于在sql语句的where子句中选择一个数据库列。
Note: This is equivalent to selecting a database column in the where clause of a SQL statement.
星型数据库的事实表中join子句中的列。
Columns in the join clauses in fact table of star schema database.
orderbyposteddesc子句强迫此查询按posted列中的日期(即文章发布到Web站点的日期)的降序返回行。
The order by posted desc clause forces the query to return rows in descending order by the date in the posted column (which is the date that the article was posted on the Web site).
values子句还为用户指定的oid列的值包括了一个casting函数,因为该值必须强制转换成目标表的REFERENCE类型。
The VALUES clause also includes a casting function for the user-specified value of the OID column because the value must be cast into the REFERENCE type of the target table.
当在RUNSTATS中指定LIKEstatistics子句时,将收集附加的列统计信息。
When the LIKE statistics clause is specified in RUNSTATS, additional column statistics are collected.
在MEDIUM模式的显式的UPDATESTATISTICS操作中,resolution子句中新的SAMPLINGSIZE选项可以指定列分布进行抽样的最少行数。
In explicit UPDATE STATISTICS operations in MEDIUM mode, a new SAMPLING SIZE option in the Resolution clause can specify the minimum number of rows to sample for column distributions.
例如,在前面的查询中,XMLExists的passing子句不需要指定custxml列。
For example, in the previous query the XMLExists passing clause does not specify the CUSTXML column.
使用新的DROPcolumn子句删除列。
创建如下索引,该索引含有以上查询的where子句的谓词引用的全部两个列,由SALARY列隔开。
And create the following index that includes both columns referenced by predicates in the WHERE clause of the above query, separated by the SALARY column.
还应注意,这里使用了include子句,这一次是为了放弃ol_dist_info列。
Also note that, again, the INCLUDE clause has been used, this time to pass the OL_DIST_INFO column up.
对于select子句中的xmlquery函数,默认情况下传递purchaseorder表的porder列。
For the xmlquery function in the SELECT clause, the porder column of the purchaseorder table is passed by default.
指定列的行用来组成SQLselect语句的select、FROM和ORDERBY子句。
The row specifying the column is used to populate the select, FROM and ORDER BY clauses of the SQL select statement.
第一行是一个SQL子句,指定仅检索 "clients"表 "name"列中的信息。
The first line is an SQL clause specifying that you only want to retrieve information in the "name" column of the "clients" table.
还可以看到“set”子句给xml列“info”设置一个新值,这个新值是一个XMLQUERY函数的结果。
You also see that the "set" clause assigns a new value to the XML column "info", and that this new value is the result of an XMLQUERY function.
因为xml列不能参与groupBy子句,所以需要定义第二个XML RelationalMapping操作符(图1中上方的分支)。
Because XML columns cannot participate in Group By clauses, you need to define a second XML Relational Mapping operator (shown on the upper branch of Figure 1).
应用推荐