Can someone tell me what i'm doing wrong here it's got to be something simple first I created some tables with foreign keys and then tried to import the data from textfiles and had all sorts of errors without ever getting the data in so now I tried to just create the tables load the data in then add the foreign keys hoping that would work but it isnt either heres what i've done
create table Books (
ISBN Char(10) not null,
Title Varchar(50) not null,
Price Decimal(5,2) null,
Authors Varchar(50) null,
Pages int null,
PubYear int null,
QTY int null,
Constraint Books_PK primary key(ISBN)
);
create table customers (
customerid int not null,
company varchar(30) null,
firstname varchar(30) null,
lastname varchar(30) null,
street varchar(50) null,
city varchar(30) null,
state char(2) null default 'NE',
zip char(5) null,
phone char(10) null,
constraint customer_pk primary key(customerid)
);
create table orders (
orderid int not null,
customerid int not null,
orderdate date null,
shipdate date null,
shipping decimal(5,2) null,
salestax decimal(5,2) null,
constraint order_pk primary key(orderid)
);
create table orderinfo (
orderid int not null,
isbn char(10) not null,
qty int not null,
price decimal(5,2) not null,
detailid int not null auto_increment,
constraint orderinfo_pk primary key(detailid)
);
load data infile 'C:/lab8/books.txt
into table books;
it gives me an error saying DATA TOO LONG FOR COLUMN ISBN IN ROW 1
the content of the textfile is
0929306279, Bell labs, 29.95, Gehani, 269, 2008, 121
0929306260, Java, 49.95, Sahni & Kumar, 465, 2008, 35
0670031844, White Mughals, 34.95, Dalrymple, 459, 2008, 78
0439357624, Born Confused, 16.95, Hidier, 432, 2007, 11
clearly the ISBN is 10 characters so why won't it go into the table?