Jump to content

[SOLVED] Error #1064 You have an error in your SQL syntax


Recommended Posts

I've tried to create new table with phpMyAdmin ...

 

When I was submiting new table i got an error:

#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near 'UNSIGNED NOT NULL, `moc_motorja` INT UNSIGNED NOT NULL, `moc_mo

 

I've been looking for solution for a long time... but was unsuccessful..

 

Please help!

 

Thanks!

CREATE TABLE `personal` (
`id` INT( 30 ) NOT NULL AUTO_INCREMENT ,
`proizvajalec` VARCHAR( 30 ) NOT NULL ,
`model` VARCHAR( 30 ) NOT NULL ,
`cena` INT( 10 ) UNSIGNED NOT NULL ,
`letnik` INT( 5 ) UNSIGNED NOT NULL ,
`letnik1` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`dolzina` INT( 4 ) NOT NULL ,
`dolzina1` ENUM( '1', '2' ) NOT NULL DEFAULT '1',
`lokacijadrzava` VARCHAR( 30 ) NOT NULL ,
`lokacijadrzava1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`zastava` TINYINT( 2 ) UNSIGNED NOT NULL ,
`st_trupov` TINYINT( 2 ) UNSIGNED NOT NULL ,
`lastnik` TINYINT( 2 ) UNSIGNED NOT NULL ,
`ohranjenost` TINYINT( 2 ) UNSIGNED NOT NULL ,
`posdkoba` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`poskodba1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`obnovljeno` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`obnovljeno1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`sirina` INT( 3 ) UNSIGNED NOT NULL ,
`sirina1` ENUM( '1', '2' ) NOT NULL ,
`potovalhitrost` INT( 4 ) UNSIGNED NOT NULL ,
`potovalhitrost1` ENUM( '1', '2' ) NOT NULL ,
`maxhitrost` INT( 4 ) UNSIGNED NOT NULL ,
`maxhitrost1` ENUM( '1', '2' ) NOT NULL ,
`rezervargor` INT( 4 ) UNSIGNED NOT NULL ,
`rezervargor1` ENUM( '1', '2' ) NOT NULL ,
`poraba` INT( 4 ) UNSIGNED NOT NULL ,
`poraba1` ENUM( '1', '2' ) NOT NULL ,
`poraba2` INT( 4 ) UNSIGNED NOT NULL ,
`poraba21` ENUM( '1', '2' ) NOT NULL ,
`rezervarvode` INT( 4 ) UNSIGNED NOT NULL ,
`rezervarvode1` ENUM( '1', '2' ) NOT NULL ,
`mattrupa` TINYINT( 2 ) UNSIGNED NOT NULL ,
`oblikovalec` VARCHAR( 30 ) NOT NULL ,
`st_jamborjev` TINYINT( 2 ) UNSIGNED NOT NULL ,
`st_jadr` TINYINT( 2 ) UNSIGNED NOT NULL ,
`povrsina_gl` INT( 4 ) UNSIGNED NOT NULL ,
`povrsina_gl1` ENUM( '1', '2' ) NOT NULL ,
`skupna_pov_j` INT( 4 ) UNSIGNED NOT NULL ,
`skupna_pov_j1` ENUM( '1', '2' ) NOT NULL ,
`shranjevanje_jadra` TINYINT( 2 ) UNSIGNED NOT NULL ,
`shranjevanje_jadra1` VARCHAR( 25 ) NOT NULL ,
`spinaker` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`genaker` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`el_vinc_za_jadra` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`palub_oprema` VARCHAR( 25 ) NOT NULL ,
`bowthruster` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`brez_motorja` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`konzola_z_volanom` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`zlozljiv` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`suhateza` MEDIUMINT( 5 ) UNSIGNED NOT NULL ,
`suhateza1` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`max_stpotnikov` MEDIUMINT( 3 ) UNSIGNED NOT NULL ,
`max_obremenitev` MEDIUMINT( 5 ) UNSIGNED NOT NULL ,
`max_obremenitev1` ENUM( '1', '2' ) NOT NULL ,
`max_moc_motorja` INT( 5 ) UNSIGNED NOT NULL ,
`max_moc_motorja1` ENUM( '1', '2' ) NOT NULL ,
`kobilica` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`kobilica2` TINYINT( 2 ) UNSIGNED NOT NULL ,
`dno` TINYINT( 2 ) UNSIGNED NOT NULL ,
`st_vesel` TINYINT( 2 ) UNSIGNED NOT NULL ,
`premer_tube` TINYINT( 3 ) UNSIGNED NOT NULL ,
`premer_tube1` ENUM( '1', '2' ) NOT NULL ,
`registrdo` ENUM( '0', '1' ) NOT NULL ,
`registrdo1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`garancija` MEDIUMINT( 3 ) UNSIGNED NOT NULL ,
`garancija1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`stnadstropji` TINYINT( 2 ) UNSIGNED NOT NULL ,
`stlezisc` TINYINT( 2 ) UNSIGNED NOT NULL ,
`stkabin` TINYINT( 2 ) UNSIGNED NOT NULL ,
`kopalnica` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`kopalnica1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`toplavoda` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`wc` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`wc1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`stedilnik` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`hladilnik` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`mirkovalovna` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`klima` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`ogrevanje` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`savna` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`jacuzzi` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`bar` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`skiperska_kab` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`proizmot` VARCHAR( 30 ) NOT NULL ,
`modelmot` VARCHAR( 30 ) NOT NULL ,
`vrstamot` ENUM( '1', '2' ) NOT NULL ,
`takt_motorja` ENUM( '1', '2' ) NOT NULL ,
`vrstapogona` ENUM( '1', '2' ) NOT NULL ,
`gorivo` TINYINT( 2 ) UNSIGNED NOT NULL ,
`kapac_baterije` TINYINT( 2 ) UNSIGNED NOT NULL ,
`nac_vziga` ENUM( '1', '2' ) NOT NULL ,
`stmot` TINYINT( 2 ) UNSIGNED NOT NULL ,
`skupnamoc` INT( 4 ) UNSIGNED NOT NULL ,
`skupnamoc1` ENUM( '1', '2' ) UNSIGNED NOT NULL ,
`moc_motorja` INT( 4 ) UNSIGNED NOT NULL ,
`moc_motorja1` ENUM( '1', '2' ) NOT NULL ,
`sturdelov` INT( 5 ) UNSIGNED NOT NULL ,
`servis` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`servis1` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`okvaramotorja` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`okvaramotorja1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`dodatnmotor` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`dodatnmotor1` VARCHAR( 30 ) NOT NULL ,
`moc_dodatn` INT( 3 ) UNSIGNED NOT NULL ,
`moc_dodatn1` ENUM( '1', '2' ) NOT NULL ,
`garancijamot` TINYINT( 3 ) UNSIGNED NOT NULL ,
`garancijamot1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`prodprikolico` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`prodcolnom` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`prodcolnom1` VARCHAR( 30 ) NOT NULL ,
`dolzinadodat` MEDIUMINT( 3 ) UNSIGNED NOT NULL ,
`dolzinadodat1` ENUM( '1', '2' ) NOT NULL ,
`prodskijet` ENUM( '0', '1' ) NOT NULL ,
`prodskijet1` VARCHAR( 30 ) NOT NULL ,
`kompas` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`brzinomer` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`brzinomer1` VARCHAR( 30 ) NOT NULL ,
`globinomer` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`globinomer1` VARCHAR( 30 ) NOT NULL ,
`mer_vetra` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`mer_vetra1` VARCHAR( 30 ) NOT NULL ,
`gps` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`gps1` VARCHAR( 30 ) NOT NULL ,
`chartplotter` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`chartplotter1` VARCHAR( 30 ) NOT NULL ,
`avtopilot` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`avtopilot1` VARCHAR( 30 ) NOT NULL ,
`radar` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`radar1` VARCHAR( 30 ) NOT NULL ,
`iskalecrib` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`iskalecrib1` VARCHAR( 30 ) NOT NULL ,
`radio` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`radio1` ENUM( '0', '1', '2' ) NOT NULL DEFAULT '0',
`hifi` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tv` TINYINT( 2 ) UNSIGNED NOT NULL ,
`tv1` ENUM( '0', '1', '2', '3' ) NOT NULL DEFAULT '0',
`vhfpostaja` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`vhfpostaja1` VARCHAR( 30 ) NOT NULL ,
`generator` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`generator1` MEDIUMINT( 4 ) UNSIGNED NOT NULL ,
`soncnecelice` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`elektvitlo` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`hidrvolan` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`pozluci` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`zarometi` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`sprayhood` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tenda` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`bimini` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`canvas` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`pokrivalo` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`lzcerada` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`elpasarela` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tikpaluba` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tuskrma` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`mizakrma` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`brisvetrobran` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`helploscad` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`oblsedezi` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`stopnice` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`sidro` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`torba` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`vesla` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tlacilka` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`eltlacilka` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`setpopravilo` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`manometer` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`odlagprostorp` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`odlagprostor` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`resset` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`kaluzna` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`shore_power` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`charterizv` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`stribpalic` TINYINT( 2 ) UNSIGNED NOT NULL ,
`ribmreza` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`dol_rib_mreza` MEDIUMINT( 4 ) UNSIGNED NOT NULL ,
`dol_rib_mreza1` ENUM( '1', '2' ) NOT NULL ,
`vrsa` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`velikost_vrsa` MEDIUMINT( 4 ) UNSIGNED NOT NULL ,
`maxulov` INT( 4 ) UNSIGNED NOT NULL ,
`maxulov1` ENUM( '1', '2' ) NOT NULL ,
`elvinczamrezo` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`stdrzalpalic` TINYINT( 2 ) UNSIGNED NOT NULL ,
`st_sedezev` TINYINT( 3 ) UNSIGNED NOT NULL ,
`moz_sed_sto` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`prost_motorja` INT( 4 ) UNSIGNED NOT NULL ,
`st_valj_motorja` TINYINT( 2 ) UNSIGNED NOT NULL ,
`vlecna_vrv` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`vodne_smuci` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`mono_ski` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`wake_board` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`trick_board` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`knee_board` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`tuba` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`banana` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`resilni_jopic` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`resilni_jopic1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`celada` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`celada1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`neopren` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`neopren1` TINYINT( 2 ) UNSIGNED NOT NULL ,
`pod_plosca` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
`slika1` TEXT NOT NULL ,
`slika2` TEXT NOT NULL ,
`slika3` TEXT NOT NULL ,
`slika4` TEXT NOT NULL ,
`slika5` TEXT NOT NULL ,
`slika6` TEXT NOT NULL ,
`email` TEXT NOT NULL ,
`fname` VARCHAR( 40 ) NOT NULL ,
`lname` VARCHAR( 40 ) NOT NULL ,
`telefon` INT( 20 ) NOT NULL ,
`gsm` INT( 20 ) NOT NULL ,
`skupina` TINYINT( 2 ) UNSIGNED NOT NULL ,
`podskupina` TINYINT( 2 ) UNSIGNED NOT NULL ,
`drzava_tel` TINYINT( 2 ) UNSIGNED NOT NULL ,
`aktivacija` ENUM( '0', '1' ) NOT NULL DEFAULT '0',
UNIQUE (
`id`
)
) TYPE = MYISAM 

Jup .. that was the problem .. solving mistakes in your own code can be problem :)

 

Another question ... I didn't use null before... How can I use it?

 

What is diffrence between null and not null ... I will have few options which won't be inserted by user ... Should I set this to null than??

Allowing null values means that a field can have NULL as a value and the NULL value is set as the value of the particular field when an inserting a new record and not providing a value for the particular field, on the other hand a NOT NULL setting for the same insert would produce an error message similar to `field can not be null`- NOT NULL pretty much means that a field must have some sort of value besides NULL when a new record is inserted.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.