i am creating a table employee which looks like this

use employeemaster;
drop table if exists  employee;
create table employee
(
  serial     int unsigned NOT NULL auto_increment,
  empid     tinytext  NOT NULL ,
  empname   varchar(255) NOT NULL,
  address   text NOT NULL
  mobile    bigint unsigned NOT NULL,
  grade    char(2) NOT NULL,
  basic    decimal(10,2) NOT NULL,
  
  primary key (mobile)
    
  
);

but in the command line when i run it it gives

error 1064(42000)
check the right syntax to use near 'mobile bigint unsigned NOT NULL,
                                    grade char(2) NOT NULL,
                                    basic deci' at line 7

please help!

Recommended Answers

All 2 Replies

A comma is missing at the end of the previous line.
address TEXT NOT NULL,

thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.