SQL创建表时出错,请问是什么原因。
SQL>begin2createtablestudents3(4student_idnumbernotnull,5student_namevarchar2(20),6)7...
SQL> begin
2 create table students
3 (
4 student_id number not null,
5 student_name varchar2(20),
6 )
7 tablespace users
8 /
create table students
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge 展开
2 create table students
3 (
4 student_id number not null,
5 student_name varchar2(20),
6 )
7 tablespace users
8 /
create table students
*
ERROR at line 2:
ORA-06550: line 2, column 1:
PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
( begin case declare exit for goto if loop mod null pragma
raise return select update while with <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
continue close current delete fetch lock insert open rollback
savepoint set sql execute commit forall merge pipe purge 展开
3个回答
展开全部
从错误消息理解 貌似是语法错误。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-09-07
展开全部
begin是多余的。。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
create table students ( student_id number not null, student_name varchar2(20));
试一下
试一下
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询