sql - There was an error parsing the query. [ Token line number = 2,Token line offset = 3,Token in error = Employee_ID ] -


i trying execute below query iam getting folowing error.

create table employee( employee_id char(5)primary key,  first_name char(20) not null, last_name char(20) not null, phone_number varchar(20) null   );  major error 0x80040e14, minor error 26302 > create table employee( employee_id char(5)primary key,  first_name char(20) not null, last_name char(20) not null, phone_number varchar(20) null   ) 

the specified data type not valid. [ data type (if known) = char ]

if database using version of microsoft sql server compact edition (which error message suggest) error stems fact particular database doesn't support thechar/varchardata types it's purely unicode based. need use corresponding unicode data typesnchar/nvarcharlike this:

create table employee ( employee_id nchar(5) primary key,  first_name nchar(20) not null, last_name nchar(20) not null, phone_number nvarchar(20) null   ); 

for reference: data types supported in sql server ce


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -