SQL Server : how to create table with columns name as schemaname.columnname

209 Views Asked by At

I am trying to create the table using below codes but the column name do not show schema name.

Select customer as `tablename.customer`
From tablename 

Also, I tried

Select customer as [tablename.customer]
From tablename 

Any suggestions?

Thank you, KP

1

There are 1 best solutions below

0
Laughing Vergil On

Based on the assumption of Dremel / Drill, use a table alias on your queries, e.g.

Select t.customer as `tablename.customer`
From tablename t;