- Feb 19, 2001
- 408
- 0
- 0
I trying to figure out how to create a SQL script to make my data insertion a bit easier, but something is going wrong. First I'm trying to just get a basic create table script to work but I keep getting an that I wouldn't get if I typed it in manually.
CREATE TABLE users
(
user_id int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
created datetime,
contact_id int unsigned NOT NULL,
username varchar(20) NOT NULL,
password varchar(20) NOT NULL,
index idx_contact_id (contact_id)
);
I would think this would work since it just cut and paste from a site. But I keep getting a syntax error @ line 11. But when i look at the code, its looks fine. I'm just naming it user.sql. And when I get into sqlplus i just type in "! user.sql;". It runs but it finds the error, what am i doing wrong?
CREATE TABLE users
(
user_id int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
created datetime,
contact_id int unsigned NOT NULL,
username varchar(20) NOT NULL,
password varchar(20) NOT NULL,
index idx_contact_id (contact_id)
);
I would think this would work since it just cut and paste from a site. But I keep getting a syntax error @ line 11. But when i look at the code, its looks fine. I'm just naming it user.sql. And when I get into sqlplus i just type in "! user.sql;". It runs but it finds the error, what am i doing wrong?