Jump to content
Sign in to follow this  
game-game

Boleh Tolong Check Tak?

Recommended Posts

salam..korang bleh check tak coding sql aku?? aku taktau maner silap.. :(

create table Branch(

BranchNo VARCHAR(4),

Street VARCHAR(20),

city VARCHAR(20),

postcode NUMBER(5),

constraint Branch_PKey PRIMARY KEY(BranchNo));

INSERT INTO Branch VALUES('BOO5','88 Inanam Road','Kota Kinabalu',88586);

INSERT INTO Branch VALUES('BOO7','199 Nilai St','Seremban',77756);

INSERT INTO Branch VALUES('BOO8','30 Lorong Duku','Miri',99957);

create table stuff(

StaffNo NUMBER(3),

FName VARCHAR(10),

LName VARCHAR(10),

Position VARCHAR(15),

Sex VARCHAR(3),

State VARCHAR(20),

Salary NUMBER(7),

BranchNo VARCHAR(4),

Constraint Branch2_PKey PRIMARY KEY(StaffNo),

FOREIGN KEY(BranchNo)REFERENCES Branch);

INSERT INTO stuff VALUES(100,'Sylvester','Ito','G.Manager','M','Selangor',60000,'BOO3');

INSERT INTO stuff VALUES(200,'Tommy','Lee','Manager','M','Sabah',9000,'BOO5');

INSERT INTO stuff VALUES(300,'Jimmy','Johnny','Supervisor','M','Kuala Lumpur',9000,'BOO1');

INSERT INTO stuff VALUES(400,'Melenie','Alex','Manager','F','Kuala Lumpur',20000,'BOO1');

INSERT INTO stuff VALUES(500,'Irene','Tan','Assistant','F','Sarawak',8500,'BOO8');

INSERT INTO stuff VALUES(600,'Terrence','Dominic','Accountant','M','Negeri Sembilan',15000,'BOO7');

INSERT INTO stuff VALUES(700,'Albert','Ernest','Manager','M','Selangor',25000,'BOO3');

INSERT INTO stuff VALUES(800,'Vincent','Gom','Supervisor','M','Kuala Lumpur',8500,'BOO1');

INSERT INTO stuff VALUES(900,'James','Sulivan','Assistant','M','Sabah',10000,'BOO5');

INSERT INTO stuff VALUES(999,'Alfonso','Joseph','Assistant','M','Selangor',11000,'BOO3');

Thanks..

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...