June 22, 2023 at 2:52 pm
.
Learning something new on every visit to SSC. Hoping to pass it on to someone else.
June 22, 2023 at 3:03 pm
SQL Server does not allow duplicate column names in a table.
You could put brackets in the actual column name if you really wanted to, although of course that's a terrible idea. But then those chars would show in the column name in sys.columns. (Avoid using INFO_SCHEMA views in SQL Server.)
You can have duplicate columns names in the result of a query as long as you don't attempt to write the results to another table.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply