官术网_书友最值得收藏!

The rename operation

The rename operation is used to alter the attribute name of the resultant relation or to give a specific name to the resultant relation. The rename operation is used to perform the following:

  • Remove confusion if two or more relations have attributes with the same name
  • Provide user-friendly names for attributes, especially when interfacing with reporting engines
  • Provide a convenient way to change the relation definition and still be backward compatible

The AS keyword in SQL is the equivalent of the rename operator in relational algebra. The following SQL example creates a relation with one tuple and one attribute, which is renamed PI:

SELECT 3.14::real AS PI;
主站蜘蛛池模板: 象州县| 额尔古纳市| 旺苍县| 彭州市| 舟山市| 荃湾区| 吉木乃县| 额济纳旗| 汶上县| 鱼台县| 屯门区| 忻城县| 舟曲县| 宜宾市| 明光市| 博湖县| 灵台县| 临清市| 姚安县| 龙陵县| 甘孜| 江陵县| 凤庆县| 龙江县| 黄梅县| 拉萨市| 宣武区| 威远县| 辛集市| 顺平县| 阿勒泰市| 松滋市| 崇仁县| 方正县| 陵水| 皮山县| 汾西县| 洛川县| 竹溪县| 区。| 任丘市|