在尝试插入数据时,它给我和错误指定我缺少逗号?

时间:2014-10-22 09:42:23

标签: mysql

create table inventory 
(
    Books_number number (8),
    Book_name varchar2 (45), 
    price  number (5),
    quantity number (5)
);

insert into inventory  values (book_seq.nextval*10, 'Midnight Summer's Dream', $5.00, 5);

1 个答案:

答案 0 :(得分:1)

书名中有撇号,因此它充当字符串的分隔符。逃避单引号字符:

insert into inventory values (book_seq.nextval*10, 'Midnight Summer\'s Dream', $5.00, 5);