none
Access Column Alias - does column still retain orignal datatype RRS feed

  • Question

  • Fellow Developers,

    I am trying to confirm that if you give a column an alias name in a query in Access, does that alias still represent the same data type of the real column or does everything get flipped to text that refers to that alias?

    For example,

    Table mystuff

    NameId int,

    NameValue text

    Select 'Name _ID': nameid, namevalue from mystuff.

    When you use this query in code and you do a where on the 'Name_ID' does that still represent a int and not text?

    My testing shows that it still appears to be an int but I want to confirm.

    Saturday, August 13, 2016 4:17 PM

Answers

  • Assigning an alias to a column doesn't affect the data type of the column, it merely changes the display name of the column.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by mg30 Saturday, August 13, 2016 4:48 PM
    Saturday, August 13, 2016 4:45 PM

All replies

  • Assigning an alias to a column doesn't affect the data type of the column, it merely changes the display name of the column.

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by mg30 Saturday, August 13, 2016 4:48 PM
    Saturday, August 13, 2016 4:45 PM
  • thanks Hans
    Saturday, August 13, 2016 4:48 PM