Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Column Alias in Informix database table

Tags:

informix

I want to use column aliases while selecting the column in an informix database table. For example in the following query:

SELECT hire_dt as "Hire Date" FROM employee

Column hire_dt should be displayed as Hire Date. How can I do this in informix?

like image 374
Avinash Avatar asked Sep 21 '10 10:09

Avinash


2 Answers

In you connection string you can use:

Database=mydatabase;Host=192.168.100.1;Max Pool Size=3;
Min Pool Size=1;Pooling=True;Protocol=onsoctcp;Password=informix;
Server=ol_server;Service=1256;User ID=informix;delimident=y

delimident=y

like image 24
Fernando Ordoñez Avatar answered Sep 18 '22 11:09

Fernando Ordoñez


This is fine as long as you have the DELIMIDENT environment variable set. Read up about it in the documentation.

like image 156
fredley Avatar answered Sep 19 '22 11:09

fredley