Why does MS SQL allow you to create an illegal column? : <p>I recently saw a tweet stating that you could prevent other developers from reading from a table using the <code>SELECT * FROM TableName</code> by building your table in the following way:</p>

<pre><code>CREATE TABLE [TableName]
(
   [ID] INT IDENTITY NOT NULL,
   [Name] VARCHAR(50) NOT NULL,
   [DontUseStar] AS (1 / 0)
);
</code></pre>

<p>It's easy to see that using the <code>SELECT *</code> here would try to read the blank column name as 1 divided by 0 (thus causing a divide by zero error), but without a datatype assigned to the column.</p>

<p>Why does SQL allow you to create a column with no assigned data type, with a name it knows will be illegal?</p>
