title: How to change data type from date to int in SQL Server 2012?
body: <p>I have a table like </p>
  
  <pre><code>CREATE TABLE Student 
  (
      s_id int NOT NULL IDENTITY(1,1),
      sname nvarchar(30) NOT NULL,
      address nvarchar(30) NOT NULL,
      gender varchar(10) NOT NULL,
      birthyear date NOT NULL,
      CONSTRAINT PK_Student PRIMARY KEY (s_id)
  );
  </code></pre>
  
  <p>Now I want to change data type of column <code>birthyear</code> from <code>date</code> to <code>integer</code>. </p>
  
  <p>I followed tutorial of w3school.com :</p>
  
  <pre><code>ALTER TABLE table_name
  ALTER COLUMN column_name datatype
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>ALTER TABLE Student 
  ALTER COLUMN birthyear int
  </code></pre>
  
  <p>But it throws an error</p>
  
  <blockquote>
    <p>Operand type clash: date is incompatible with int</p>
  </blockquote>
  
  <p>Can you people help me? Please.</p>
  
  <p>Thank you!</p>