Column Reference (SQL)

Introduction

The SQL Column Reference is a reference to a column in a table or query result.

Syntax

column-reference ::=
  identifier [ { . identifier } ]

Remarks

Column references can consist of a single identifier, or an identifier chain. You can use an identifier chain to resolve ambiguities when a query refers to multiple tables.

Examples

Single identifier column references:

Select FullName, Value, Units
From TagDataPointAnalog

Two part column identifiers using a correlation name:

Select "T".FullName, "T".Value, "T".Units
From TagDataPointAnalog "T"

Three part column identifiers using a schema and table name to qualify the column names:

Select CommonBase.TagDataPointAnalog.FullName, CommonBase.TagDataPointAnalog.Value, CommonBase.TagDataPointAnalog.Units
From CommonBase.TagDataPointAnalog

Further Information

Value Expressions (SQL)

To learn more about SQL scalar value expressions.

Fernhill SCADA Structured Query Language (SQL)

To learn more about the SQL features in Fernhill SCADA.

Glossary

For the meaning of terms used in Fernhill SCADA.