Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DB2 - create table throws syntax error "(" unexpected

When I try to create table in db2, it throws the following error

$ db2 CREATE TABLE employee(emp_id INT NOT NULL, emp_name VARCHAR(100))
sh: Syntax error: "(" unexpected

Please help. Thanks in advance

like image 602
Coder Avatar asked Jun 13 '11 05:06

Coder


1 Answers

The problem is not DB2 but the shell. Use:

$ db2 "CREATE TABLE employee(emp_id INT NOT NULL, emp_name VARCHAR(100))"
like image 180
Jonathan Leffler Avatar answered Sep 17 '22 23:09

Jonathan Leffler