- Learning PostgreSQL 11
- Salahaldin Juba Andrey Volkov
- 110字
- 2021-07-02 13:11:39
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;
推薦閱讀
- Learn ECMAScript(Second Edition)
- Facebook Application Development with Graph API Cookbook
- iOS開發(fā)實(shí)戰(zhàn):從零基礎(chǔ)到App Store上架
- Oracle 12c中文版數(shù)據(jù)庫管理、應(yīng)用與開發(fā)實(shí)踐教程 (清華電腦學(xué)堂)
- 深入淺出Android Jetpack
- Processing互動(dòng)編程藝術(shù)
- Kotlin Standard Library Cookbook
- Microsoft Dynamics GP 2013 Reporting, Second Edition
- Visual C++應(yīng)用開發(fā)
- SQL經(jīng)典實(shí)例(第2版)
- C語言程序設(shè)計(jì)實(shí)驗(yàn)指導(dǎo) (第2版)
- 西門子S7-200 SMART PLC編程從入門到實(shí)踐
- Mastering Xamarin.Forms(Second Edition)
- C語言程序設(shè)計(jì)
- ElasticSearch Cookbook(Second Edition)