title: errors in SQL Queries:invalid character
body: <p>I am developing a database application with JDBC, Java and Oracle. I am getting errors in two queries,</p>
  
  <p>1) Error at line 1: Invalid character
  Here I am getting error in first line, I want to check for pattern sid to be like B.....
  <pre><code>
  create table students (sid char(4) primary key check (sid LIKE ‘B%’),
  firstname varchar2(15) not null, lastname varchar2(15) not null, status varchar2(10) 
  check (status in (‘freshman’, ‘sophomore’, ‘junior’, ‘senior’, ‘graduate’)), 
  gpa number(3,2) check (gpa between 0 and 4.0), email varchar2(20) unique);</pre></code></p>
  
  <p>2) Error at line 2: Column check constraint cannot reference other columns.
  I am checking for lgrade, and I have written the same after check. (If referencing in the error means referencing to other table, then lgrade column is not referencing any other table)
  <pre><code>
  create table enrollments (sid char(4) references students, classid char(5) references classes, 
  lgrade char check (lgrade in (‘A’, ‘B’, ‘C’, ‘D’, ‘F’, ‘I’, null)), primary key (sid, classid));</pre></code></p>
  
  <p>Am I thinking in right way?, is there a possibility % is not allowed in the query (which I found is not true.)?</p>