T-SQL with a added field

  • Thread starter Thread starter Himansu
  • Start date Start date
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.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top