title: SQL Creating table Employee Department Grade
body: <p>create database staff_management; </p>
  
  <p>use staff_management;</p>
  
  <p>create table Employee 
  (
      eID int(100) NOT NULL IDENTITY(1,1) PRIMARY KEY,
      eName varchar(255) NOT NULL,
      Job text NOT NULL, 
      Salary int(100) NOT NULL,
      Comm int(100),
      hDate date NOT NULL, 
      dID int(10) NOT NULL,</p>
  
  <pre><code>constraint emp_pk primary key (eID)
  </code></pre>
  
  <p>);
  alter table Employee IDENTITY(1,1) PRIMARY KEY=1001;</p>
  
  <p>alter table Employee 
  add column Mgr int(100) after eName;</p>
  
  <p>insert into Employee(eName,Mgr,  Job, Salary, Comm, hDate, dID)
  values( "ken Adams", 1004, "Salesman", 70000, 20000, "2008-04-12", 1),
  ("Ru Jones", 1004, "Salesman", 65000, 15000, "2010-01-18", 1),
  ( "Dhal Sim", 1006, "Accountant", 88000, NULL, "2001-03-07", 2),
  ( "Ellen Honda", 1006, "Manager", 118000, NULL, "2001-03-17", 1),
  ( "Mike Bal", 1006, "Receptionist", 68000, NULL, "2006-06-21", 3),
  ( "Martin Bison",NULL, "CEO", 210000, NULL, "2010-07-12", 3),
  ( "Shen Li", 1004, "Salesman", 86000, 18000, "2014-09-18", 1),
  ( "Zang Ross", 1004, "Salesman", 65000, 10000, "2017-02-02", 1),
  ( "Sagar Kahn", 1004, "Salesman", 70000, 15000, "2016-03-01", 1);</p>
  
  <p>alter table Employee
  add constraint emp_mgr_fk foreign key (Mgr) references Employee(eID) on update cascade on delete set NULL;</p>
  
  <p>create table Department
  (
      dID int(10) NOT NULL unique IDENTITY(1,1) PRIMARY KEY,
      dName varchar(255) not null,
      Address text, 
      phone text,</p>
  
  <pre><code>constraint d_pk primary key (dID)
  </code></pre>
  
  <p>);</p>
  
  <p>alter table Employee
  add constraint emp_d_fk
  foreign key (dID) references Department(dID);</p>
  
  <p>create table Grade
  (
      gID char(10) not null unique,
      MinSal int(100), 
      MaxSal int(100),
      Leavee int(10),</p>
  
  <pre><code>constraint g_pk primary key (gID)
  </code></pre>
  
  <p>);</p>
  
  <p>INSERT INTO Grade (gID, MinSal, MaxSal, Leavee)
  VALUES ('A', NULL, 60000, 20),
  ('B', 60000, 80000, 20),
  ('C', 80000, 100000, 20),
  ('D', 100000, 120000, 25), 
  ('E', 120000, NULL, 30);</p>
  
  <p>select * from Grade;</p>
  
  <p>insert into Department (dName, Address, phone)
  values("Sales", "Sydney", "0425 198 053"),
  ("Accounts", "Melbourne", "0429 198 955"),
  ("Admin", "Melbourne", "0428 198 758"),
  ("Marketing", "Sydney", "0427 198 757");</p>
  
  <p>select * from Department;</p>
  
  <p>I'm issue with my code</p>
  
  <p>Msg 156, Level 15, State 1, Line 18
  Incorrect syntax near the keyword 'IDENTITY'.
  Msg 156, Level 15, State 1, Line 21
  Incorrect syntax near the keyword 'column'.</p>