"Aaron P. Martinez" <[EMAIL PROTECTED]> wrote:
> I am trying to set up a table from a script that came with some software
> "Value accounting/CRM" and i'm getting a few errors, one of which i
> can't seem to figure out/fix.
>
> My system is RH 3.0 ES with mysql-server-3.23.58-1. I have innodb
> tables configured with the following statement in my /etc/my.cnf:
> innodb_data_file_path = ibdata1:10M:autoextend
> set-variable = innodb_buffer_pool_size=70M
> set-variable = innodb_additional_mem_pool_size=10M
> set-variable = innodb_log_file_size=20M
> set-variable = innodb_log_buffer_size=8M
> innodb_flush_log_at_trx_commit=1
>
>
> The create table statement is below followed by the error.
>
> create table ItemSalesTax (
> STYPE integer not null primary key, /* STax Type */
> SDESC varchar(35),
> SPERC numeric(13,4) zerofill not null /* Percentage */
> check(SPERC >= 0),
> SCONUM integer not null,
> SYRNO integer not null,
> SLEVEL varchar(4) not null, /* Access Control Level */
> constraint staxlevel_ck
> check (SLEVEL in ('READ','RW','DENY')),
> constraint STax_fk foreign key (SCONUM, SYRNO)
> references AccYear(ACONUM, AYEARNO)
> );
>
>
> ERROR 1064: You have an error in your SQL syntax near 'check(SPERC >=
> 0),
> SCONUM integer not null,
> SYRNO i' at line 9
>
> I am not great w/mysql but gradually learning. I have looked in the
> online manual and can't find anything that helps.
> I would really like to get this going as soon as possible to
> evaluate...any and all help is GREATLY appreciated.
>
The above create table statement works fine for me on MySQL version 4.0.17.
Note: Currently CHECK clause does nothing in MySQL:
http://www.mysql.com/doc/en/CREATE_TABLE.html
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]