Syntax Question Constraint, Index

2006-04-03 Thread Scott Purcell
I ran into some syntax over the weekend, that I am trying to make sense of. Here is the create table statements. Drop table if exists events Drop table if exists locations Create table events ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), start_date DATE, duration INTEGER,

Re: Syntax Question Constraint, Index

2006-04-03 Thread Martijn Tonies
Create table events ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), start_date DATE, duration INTEGER, location_id BIGINT, primary key (uid) ); Create table locations ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), address VARCHAR(255), primary key (uid) ) Alter table events