T-SQL with a added field

H

Himansu

Hello everyone,

Anyonme know how to add a field to a query? I want to add a field with the
same data in all rows.

Example:

select name, id, company
from test

* There is no company field in the test table, but I want to add it to my
result with all company data equal to HHA.

Any help will be greatly appreicated.
 
T

Tim Williams

select name, id, "HHA" as company from test

Tim

Himansu said:
Hello everyone,

Anyonme know how to add a field to a query? I want to add a field with
the
same data in all rows.

Example:

* There is no company field in the test table, but I want to add it to my
result with all company data equal to HHA.

Any help will be greatly appreicated.
 
Top