Help - Search - Members - Calendar
Full Version: Error when using INSERT INTO in Oracle
Oracle DBA Forums > Oracle > Oracle Forum
Enrique Hernandez
I have declared my table and it was created with no issue. This is the code I used to declare my table...
CODE
CREATE TABLE STUDENT
  (
  Sid NUMBER(5) CONSTRAINTS STUDENT_Sid_pk PRIMARY Key,
  Slname VARCHAR2(25) NOT NULL,
  Sfname VARCHAR2(25) NOT NULL,
  Smi CHAR(1),
  saddr VARCHAR2(30),
  Scity VARCHAR2(30),
  Sstate CHAR(2) DEFAULT ('WI'),
  Sphone NUMBER(10) NOT NULL,
  Sclass CHAR(2) DEFAULT ('FR') CONSTRAINTS Sclass CHECK(Sclass IN ('FR', 'SO', 'JR', 'SR', 'GR')),
  Sdob DATE NOT NULL,
  S_pin NUMBER(4),
  Fid NUMBER(4) CONSTRAINTS STUDENT_Fid_fk REFERENCES FACULTY
  );

Now I am trying to INSERT INTO that table, but ORACLE doesn't like ANY data that I input..can someone help
CODE
INSERT INTO STUDENT VALUES
  2  (100, ‘McClure’, ‘Sarah’, ‘M’, '144 Windridge Blvd', 'Eau Claire', 'WI', 54703, 7155559876, 'SR', 14-JUL-1979, 8891, 10);
burleson
Hi Enrique,

Aha!

It does not like your "wrong" quotes!!

Blame Windows . . .

"Leaning quotes" don't work . . .

'McClure' of NOT the same as 'McClure';

' is not '
Enrique Hernandez
OMG, something so simple!

Thank you for the help!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.