_ninthbit (_ninthbit) wrote in databases,
_ninthbit
_ninthbit
databases

T-SQL field aliases

Is there a way to use field aliases in T-SQL  like:

SELECT
    (field1 + field2) as myNewField  - - declare some calculated field with alias
    , myField*2 as myDoubleField - - use it in expression for next field
where myDoubleField > 1 - - use it in where clause




Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 3 comments