Re: why doesn't this create table work?
Posted in 2000
From: Tony! >
>I've messed with queries etc, this is my first attempt to create a
>table to use myself..
>Can anyone give me some pointers as to what's wrong with my sql?
>why do I get the errors at the end?
>Is it better to use "not null" after every char (xx), that I want no
>nulls accepted, or is how I put it in the unique index at the end good
>by itself?
Not null and unique are not the same thing. Unique will still allow one null
into a column.
>Is the isql < createme.sql way I'm trying to do this completely wrong?
>
>_________
>
> database development;
>create table nightpost
> (
> tkamx_site char(2),
> tkamx_project char(10),
> tkamx_calldte char (10),
> tkamx_startupl char(6),
> tkamx_stopupl char(6),
> tkamx_uplbytes char(9),
> tkamx_origrec char(8),
> tkamx_uplrec char(8),
> tkamx_ftpstart char(6),
> tkamx_ftpend char(6),
> tkamx_poststart char(6),
> tkamx_postend char(6),
> tkamx_stlstart char(6),
> tkamx_stlend char(6),
> tkamx_postallst char(6),
> tkamx_postallst char(6),
> tkamx_comment char(50),
tkamx_comment char(50) -- remove this comma
> );
>grant all on nightpost to "public";
>create unique index tkamx_date on nightpost
>(tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;
I couldn't find "with disallow null" syntax anywhere. So I guess that's a
syntax error too.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com