title: Altering a column on SQLite after definition
body: <p>I was following an SQLite tutorial where the goal is to create a simple student database from an UML diagram.</p>
  <p>The first thing I did was copy your UML, then took a break. Upon return, I figured I'd get started from the UML while reloading your video, so the very first things I did was create the student and sex_type table as so:</p>
  <pre><code>sqlite&gt; create table student(name VARCHAR(23),
     ...&gt; sex CHARACTER(1),
     ...&gt; id_number INTEGER PRIMARY KEY);
  
  sqlite&gt; create table sex_type(sex_id TEXT PRIMARY KEY, sex_type INTEGER);
  </code></pre>
  <p>But then I realized, I forgot to indicated that I want sex_id to be NOT NULL as well. I also forgot under the to ensure that Foreign Key(sex) references sex_type(sex_id).</p>
  <p>I reviewed my SQL books, and recalled something known as the ALTER command. However, no matter how I slice it, I get something along these lines:</p>
  <pre><code>sqlite&gt; alter table sex_type MODIFY column sex_id TEXT PRIMARY KEY NOT NULL;
  Error: near &quot;MODIFY&quot;: syntax error
  sqlite&gt; alter table sex_type CHANGE column sex_id TEXT PRIMARY KEY NOT NULL;**
  Error: near &quot;CHANGE&quot;: syntax error
  sqlite&gt; alter table sex_type drop sex_id;
  Error: near &quot;DROP&quot;: syntax error
  </code></pre>
  <p>Always with the same supposed syntax error. About the only thing that has worked tonight:</p>
  <pre><code>sqlite&gt; alter table sex_type RENAME TO gender;
  sqlite&gt; alter table gender_id RENAME TO sex_type;
  </code></pre>
  <p>So what is this syntax error that I'm overlooking, because going by my books my syntax should be fine. Do I have to insert something into these columns before modification can be done (which admittedly, I haven't tried yet)? Or am I missing something obvious about the ALTER/MODIFY/CHANGE/DROP command(s)?</p>