Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

error in insert values oracle sql

$
0
0
hello
good evening
am new user in dbforums
i have create a table name branch and other table employee

* the branch table and values work fine in oracle sql
* the employee table work but the values cant insert into it

what the problem is ? can someone check it out . Thanks

CREATE TABLE Branch
(
Branch_No numeric(10) not null,
Location_Branch VARCHAR(20),
Telephone_Branch VARCHAR(20),
Address VARCHAR(50),
CONSTRAINT branchno_pk PRIMARY KEY (Branch_No)

);

insert into Branch values (01,'Manama','17442589','H:125,R:125,BH:125');
insert into Branch values (02,'Muharraq','17784125','H:1588,R:1475,BH:1447') ;
insert into Branch values (03,'Sitra','1778963','H:4789,R:147,BH:12');
insert into Branch values (04,'Isa Town','17552519','H:125,R:125,BH:125');

-----------------------------------------------------------------------------------------------

CREATE TABLE Employee
(
Emp_ID number(10) constraint empid_pk PRIMARY KEY NOT NULL,
Branch_No numeric(10) not null,
CONSTRAINT fk_branchno
FOREIGN KEY (Branch_No)
REFERENCES Branch(Branch_No),
Emp_Name VARCHAR(50),
Emp_Adress VARCHAR(50),
Emp_Phone VARCHAR(20),
Emp_NationalID VARCHAR(20),
Emp_Salary int,
Emp_Vacition INT

);


insert into Employee ( 011 , 01 , ' Hani ' , ' Manama 123 St Bab Bahrain' , ' 1772345' , 'Bahraini' , 1400 , 234 );
insert into Employee ( 012 , 02 , ' Mohammed ' , 'Muhrraq ' , '1234556' , 'Bahraini' , 500 , 222);
insert into Employee ( 013 , 03 , ' Ali ' , ' Muharraq' , '13444565; , 'Bahraini' , 700 , 333 );
insert into Employee ( 014 ,04 , ' Salman ' , 'Isa town ' , '1456345' , 'Bahraini' , 800 , 444);

Viewing all articles
Browse latest Browse all 13329

Trending Articles