开发者

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(1开发者_如何学C00))
sh: Syntax error: "(" unexpected

Please help. Thanks in advance


The problem is not DB2 but the shell. Use:

$ db2 "CREATE TABLE employee(emp_id INT NOT NULL, emp_name VARCHAR(100))"


Either you should use $db2 to enter interactive mode and next enter your statement without db2 or enter your statement as below:

$ db2 "CREATE TABLE employee(emp_id INT NOT NULL, emp_name VARCHAR(100))"

Generally, you need to use double quotes " as below:

$ db2 "insert ...."
$ db2 "delete ...."
...
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜