syntax error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sriamss
    New Member
    • Jan 2008
    • 2

    #1

    syntax error

    hi every one i getting problem in mysql whenever i am created a table.
    the following error r it shows me
    mysql> create table student(no number(5),name varchar2(8));
    ERROR 1064 (42000): 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 'numbe
    r(5),name varchar2(8))' at line 1
    mysql>

    thanks and regards
    srilekha
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Kindly do not ask questions in MySQL Articles, MySQL Forum is the right place to discuss about MySQL.

    Comment

    • rpnew
      New Member
      • Aug 2007
      • 189

      #3
      Originally posted by sriamss
      hi every one i getting problem in mysql whenever i am created a table.
      the following error r it shows me
      mysql> create table student(no number(5),name varchar2(8));
      ERROR 1064 (42000): 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 'numbe
      r(5),name varchar2(8))' at line 1
      mysql>

      thanks and regards
      srilekha
      hi,
      If i'm not wrong NUMBER is not a datatype in MySql. For numeric value you can use the following datatypes....

      TINYINT( )
      SMALLINT( )
      MEDIUMINT( )
      INT( )
      BIGINT( )
      FLOATA
      DOUBLE( , )
      DECIMAL( , )

      e.g.

      [CODE=MySql]
      create table student(no int(5),name varchar2(8));
      [/CODE]

      Regards,
      RP

      Comment

      Working...