Re: Reference column alias for common expressions

2022-05-24 Thread Tom Lane
Wood May writes: > Some databases (like Teradata) support the following syntax: > select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; > The last element in the target list can refer the second one using its > alias. > This feature is similar to some programming l

Re: Reference column alias for common expressions

2022-05-24 Thread Pantelis Theodosiou
On Tue, May 24, 2022 at 4:12 PM Wood May wrote: > > Hi, > Some databases (like Teradata) support the following syntax: > > select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; > > The last element in the target list can refer the second one using its > alias. > >

Reference column alias for common expressions

2022-05-24 Thread Wood May
Hi, Some databases (like Teradata) support the following syntax: select col1, col2*20 as col2_1, col2_1*200 as col3_1 from your_table; The last element in the target list can refer the second one using its alias. This feature is similar to some programming languages (like Lisp)'