DBxtra Documentation

DBxtra Documentation

How Can We Help?

Postgres SQL–Syntax

You are here:
< All Topics

Question

I use POSTGRES SQL. But I see that the POSTGRES SQL SINTAXES is not implemented. Example: SELECT coalesce (ean.codean) ean FROM EAN There is an error: I think that DB wants “as” For me it is important that all my QUERY to be used “how are now” .

Answer:

Currently DBxtra requires you to use the AS keyword to specify column alias, so the syntax you use (column_name alias) is not supported right now. As a side note, we recommend you to use the AS keyword before column alias as it may lead to ambiguity according to the PostgreSQL documentation (http://www.postgresql.org/docs/9.1/static/sql-select.html): “In the SQL standard, the optional key word AS can be omitted before an output column name whenever the new column name is a valid column name (that is, not the same as any reserved keyword). PostgreSQL is slightly more restrictive: AS is required if the new column name matches any keyword at all, reserved or not. Recommended practice is to use AS or double-quote output column names, to prevent any possible conflict against future keyword additions.”

Table of Contents