MySQL 5 Create table

Help
2008-03-19
2013-03-06
  • Petr Kameník

    Petr Kameník - 2008-03-19

    Hi all,
    I have allready succesfully connected to my MySQL db. However, I got another problem with creating new tables. The server returns an erorr in SQL syntax.
    Simple table:
    CREATE TABLE

     
    • Petr Kameník

      Petr Kameník - 2008-03-19

      Oops...
      CREATE TABLE oddeleni_typy (
      typ_id INTEGER NOT NULL AUTO_INCREMENT,
      typ VARCHAR NULL  ,
      PRIMARY KEY(typ_id))
      TYPE=InnoDB

      SQL Server Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to user near 'NULL  ,
      PRIMARY KEY(typ_id))
      TYPE=InnoDB' at line 3

      Now I realize its caused because of the missing lenght specification of the VARCHAR column. My fault, sorry.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks