Can you create an alias on field at time of creation? Example
CREATE TABLE MYTABLE (
VERY_LONG_NAME AS VLN INT NOT NULL )
Can you create an alias on field at time of creation? Example
CREATE TABLE MYTABLE (
VERY_LONG_NAME AS VLN INT NOT NULL )
No.
Why create a table with a VERY_LONG_NAME
and then alias it? Simply choose A_BETTER_NAME
to begin with.
In addition, it would be quite confusing to have a DB where columns are accessible by multiple names. How would you know which name was the actual name and which was the aliased name?
EDIT
As per @DavidFabers suggestion, if you must name your column VERY_LONG_NAME
, you could create a view to allow you/users to access the column by a shorter name:
CREATE VIEW [vwMyTable] AS
SELECT VERY_LONG_NAME AS A_BETTER_NAME
FROM MyTable