I understand the basics of SQL and databases. However every time I run my script to insert data into a table, I get the following error:
ORA-00001: unique constraint (string.string) violated tips
This is my code:
DROP TABLE Bag;
CREATE TABLE Bag
(
BranchID varchar2(3),
HouseName varchar2(16),
StreetName varchar2(16),
City varchar2(16),
Postcode varchar2(6),
TelephoneNo1 number,
TelephoneNo2 number,
PRIMARY KEY(BranchID)
);
INSERT INTO Bag
VALUES (01, 'Hayway', 'Jay Rd', 'Newcastle', 'N9R5DT', 09088, 09077);
BranchIDas avarchar2(3), but you attempt to insert a number into it...