- Learning PostgreSQL 10(Second Edition)
- Salahaldin Juba Andrey Volkov
- 110字
- 2021-07-02 22:42:04
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;
推薦閱讀
- Hands-On Intelligent Agents with OpenAI Gym
- Splunk 7 Essentials(Third Edition)
- 機器學習及應用(在線實驗+在線自測)
- AWS Administration Cookbook
- 大數據處理平臺
- Apache Spark Deep Learning Cookbook
- 傳感器與物聯網技術
- 運動控制系統應用與實踐
- Spatial Analytics with ArcGIS
- 云計算和大數據的應用
- 從零開始學JavaScript
- 經典Java EE企業應用實戰
- Artificial Intelligence By Example
- 工業機器人力覺視覺控制高級應用
- 基于Proteus的單片機應用技術