#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0

    Could someone double check my codes for me please


    hey i created some table in my sql but am having some problems after i have created the tables and i view the full name of some the table headings dont show up could some1 please double check my codes for me please


    CREATE TABLE AREA (

    Area_ID char (4) NOT NULL,
    Area char (7) ,

    Constraints AREA PRIMARY KEY (Area_ID));

    INSERT INTO AREA VALUES ( '1','Area A');
    INSERT INTO AREA VALUES ( '7',' Area B');
    INSERT INTO AREA VALUES ( '1842','Area FA');
    INSERT INTO AREA VALUES ( '78','Area C');
    INSERT INTO AREA VALUES ( '111','Area X');


    IN THIS CODE THE AREA_ID ONLY APPEARS AS AREA AND I DONT KNOW WHATS WRONG .. SO IT APPEARS AS I GOT AREA TWICE NOT AREA_ID AND AREA


    I HAVE THE SAME PROBLEM WITH THIS CODE ASWEL


    CREATE TABLE Location (

    LocationID char (4) NOT NULL,
    LocationName char (30) ,

    Constraints Location PRIMARY KEY (LocationID));

    INSERT INTO Location VALUES ( '123','Loc A')
    INSERT INTO Location VALUES ( '124','Loc B')
    INSERT INTO Location VALUES ( '125','Loc C')
    INSERT INTO Location VALUES ( '126','Loc D')
    INSERT INTO Location VALUES ( '127','Loc E')
    INSERT INTO Location VALUES ( '130','Loc F')
    INSERT INTO Location VALUES ( '1123','Loc G')
    INSERT INTO Location VALUES ( '321','Loc H')
    INSERT INTO Location VALUES ( '99','Loc I')
    INSERT INTO Location VALUES ( '97','Loc J')


    AND HERE
    CREATE TABLE Job (

    JobID char (3) NOT NULL,
    Job_Title char (30) ,

    Constraints Job PRIMARY KEY (JobID));

    INSERT INTO Job VALUES ( '1','');
    INSERT INTO Job VALUES ( '2','');
    INSERT INTO Job VALUES ( '3','');
    INSERT INTO Job VALUES ( '4','');
    INSERT INTO Job VALUES ( '5','');
    INSERT INTO Job VALUES ( '6','');
    INSERT INTO Job VALUES ( '7','');
    INSERT INTO Job VALUES ( '8','');
    INSERT INTO Job VALUES ( '9','');
    INSERT INTO Job VALUES ( '10','');
    INSERT INTO Job VALUES ( '11','');
    INSERT INTO Job VALUES ( '12','');
    INSERT INTO Job VALUES ( '13','');


    THE FULL NAME JobID does not show up just says jobs
    could someone please look at the and suggest possibles solutions please
  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,204
    Rep Power
    4279
    Originally Posted by number_one
    THE FULL NAME JobID does not show up just says jobs
    where exactly are you looking for these names to show up?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    7
    Rep Power
    0
    Originally Posted by r937
    where exactly are you looking for these names to show up?
    when i view the table on iSQL plus oracle.. after a table has been created instead of the table to displaying the full name of the attribute as e.g AreaID it only displays it as Area and doesn't include the ID

    do u know how i could the whole attribute name show up and not just part of it
  6. #4
  7. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,204
    Rep Power
    4279
    Originally Posted by number_one
    when i view the table on iSQL plus oracle..
    thread moved to oracle forum
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

IMN logo majestic logo threadwatch logo seochat tools logo