Results 1 to 2 of 2

Thread: New to this..

  1. #1
    Join Date
    Dec 2010

    Unanswered: New to this..

    I am kind of new to this. I am trying to create some table keep coming up with some errors and I can not figure this out. can someone please help?

    anyway here is the code to what I am trying to do hopefully someone see what I am doing wrong .. I have been looking at this for a couple of hours and now I think that I am seeing double.
    Thank you in advance for your help..

    CREATE TABLE student,
    SID char (3)  Not null,
    SNAME  char (10) Not Null,
    SEX char(1)  check (sex in ('M', 'F')), 
    MAJOR char(3) check (major in ('ACC', 'FIN', 'MGT', 'MKT')),
    GPA NUMERIC (3),
    Primary key(SID)
    create table faculty
    FID char(3) not null,
    FNAME char(10) not null, 
    EXT  char (3),
    DEPT char(3) check (DEPT in ('ACC', 'FIN', 'MGT', 'MKT')),
    RANK varchar(4) check (RANK in ('INST', 'ASST', 'ASSO', 'FULL')),
    SALARY int(0,2),
    Primary key (FID)
    create table COURSE
    CRSNBR char(6) not null,
    CNAME  char(20) not null,
    CREDIT char (1),
    FID  char (3),
    Primary key (CRSNBR)
    create table CRSENRL
    CRSNBR char (6) Not Null,
    SID  char(3) not Null, 
    GRADE char (1),
    Primary key (CRSNBR)

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    mine works better than yours after I fixed the typo
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE student
      2  (
      3  SID char (3)  Not null,
      4  SNAME  char (10) Not Null,
      5  SEX char(1)  check (sex in ('M', 'F')),
      6  MAJOR char(3) check (major in ('ACC', 'FIN', 'MGT', 'MKT')),
      7  GPA NUMERIC (3),
      8  Primary key(SID)
      9* )
    SQL> /
    Table created.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts