MySQL Forums
Forum List  »  Newbie

Re: MySQL and Apostrophes
Posted by: Hugh Mansfield
Date: April 19, 2005 01:10PM

This is the CREATE table .........

CREATE TABLE Member(
MemberNo integer not null,
FIrstName Varchar(32) not null default '',
Surname Varchar(32) not null default '',
PlaceOfBirth Varchar(32) null default '',
Nationality Varchar(32) null default '',
ClubNo integer null default '',
INDEX ClubNo_Index (ClubNo),
CONSTRAINT MemberNo_Required PRIMARY KEY(MemberNo),
)TYPE=InnoDB;
COMMIT;

With this added later on ......

ALTER TABLE member ADD CONSTRAINT PresentClub_check FOREIGN KEY (ClubNo) REFERENCES Club(ClubNo);
COMMIT;

And this is the data i am trying to add to this table ...

INSERT INTO member VALUES
(00000001,’Michael’,’Devine’,’Cork’,’Irish’,000005),
(00000002,’Danny’,’Murphy’,’London’,’English’,000005),
(00000003,’Alan’,’Bennett’,’Cork’,’Irish’,000005),
(00000004,’Dan’,’Murray’,’Cambridge’,’Irish’,000005),
(00000005,’Neal’,’Horgan’,’Cork’,’Irish’,000005),
(00000006,’Colin’,’O\’Brien’,’Cork’,’Irish’,000005),
(00000007,’George’,’O\’Callaghan’,’Cork’,’Irish’,000005),
(00000008,’Joe’,’Gamble’,’Cork’,’Irish’,000005),
(00000009,’Liam’,’Kearney’,’Cork’,’Irish’,000005),
(00000010,’Kevin’,’Doyle’,’Wexford’,’Irish’,000005),
(00000011,’John’,’O\’Flynn’,’Cork’,’Irish’,000005),
(00000012,’Steve’,’Williams’,’Aberystwyth’,’Welsh’,000018),
(00000013,’Owen’,’Heary’,’Dublin’,’Irish’,000018),
(00000014,’David’,’Crawley’,’Dundalk’,’Irish’,000018),
(00000015,’Jamie’,’Harris’,’Swansea’,’Welsh’,000018),
(00000016,’Colin’,’Hawkins’,’Galway’,’Irish’,000018),
(00000017,’Wesley’,’Hoolahan’,’Dublin’,’Irish’,000018),
(00000018,’Ollie’,’Cahill’,’Clonmel’,’Irish’,000018),
(00000019,’Stuart’,’Byrne’,’Dublin’,’Irish’,000018),
(00000020,’Alan’,’Crawley’,’Sligo’,’Irish’,000018),
(00000021,’Glen’,’Fitzpatrick’,’Dublin’,’Irish’,000018),
(00000022,’Jason’,’Byrne’,’Dublin’,’Irish’,000018),
(00000023,’Patrick’,’Holden’,’Kilkenny’,’Irish’,000022),
(00000024,’Neil’,’Andrews’,’Kilkenny’,’Irish’,000022),
(00000025,’John’,’Frost’,’Limerick’,’Irish’,000022),
(00000026,’Kevin’,’Doherty’,’Dublin’,’Irish’,000022),
(00000027,’Pat’,’Purcell’,’Dublin’,’Irish’,000022),
(00000028,’Stephen’,’Yelverton’,’Cork’,’Irish’,000022),
(00000029,’Alan’,’Reynolds’,’Waterford’,’Irish’,000022),
(00000030,’Sean’,’Finn’,’Dublin’,’Irish’,000022),
(00000031,’Kevin’,’Waters’,’Wexford’,’Irish’,000022),
(00000032,’Daryl’,’Murphy’,’Waterford’,’Irish’,000022),
(00000033,’Willie’,’Bruton’,’Cork’,’Irish’,000022),
(00000034,’David’,’Forde’,’Galway’,’Irish’,000022),
(00000035,’Dan’,’Connor’,’Dublin’,’Irish’,000007),
(00000036,’Damien’,’Lynch’,’Dublin’,’Irish’,000007),
(00000037,’Simon’,’Webb’,’London’,’English’,000007),
(00000038,’Steven’,’Grey’,’Dublin’,’Irish’,000007),
(00000039,’Stuart’,’Malcolm’,’Edinburgh’,’Scottish’,000007),
(00000040,’Graham’,’Gartland’,’Dublin’,’Irish’,000007),
(00000041,’Shane’,’Robinson’,’Waterford’,’Irish’,000007),
(00000042,’Sami’,’Ristilla’,’Valkeakoski’,’Finnish’,000007),
(00000043,’Declan’,’O\’Brien’,’Dublin’,’Irish’,000007),
(00000044,’Mark’,’Rooney’,’Dublin’,’Irish’,000007),
(00000045,’Alan’,’Reilly’,’Dublin’,’Irish’,000007);
COMMIT;



Any ideas ??

Options: ReplyQuote


Subject
Written By
Posted
April 18, 2005 02:42PM
April 18, 2005 03:24PM
Re: MySQL and Apostrophes
April 19, 2005 01:10PM
April 19, 2005 01:37PM
April 30, 2005 03:57PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.