建表时:
在command窗口 ,如这样的SQL语句可以一次完成
create table COM_DICTIONARY
(
DICT_NO INTEGER not null,
DICT_VALUE VARCHAR2(30) not null,
DICT_NAME VARCHAR2(40) not null,
DICT_CAPTION VARCHAR2(40),
DICT_PARENT VARCHAR2(30),
DICT_ORDER INTEGER
);
create table DEPARTMENT
(
DEPT_ID VARCHAR2(32) not null,
DEPT_NAME VARCHAR2(40),
DEPT_PARENTID VARCHAR2(32)
);
也可以在SQL window
分两次执行上边两个
那么型如
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES
( '0 ', 'sysadmin ', '1 ',NULL),
( '1 ', 'superadmin ', '1 ',NULL),
( '2 ', 'genadmin ', '1 ',NULL);
这样的语句怎么在SQL window执行呢??
我运行的时候都是出错 说SQL command not properly ended
不是insert必须分三次执行吧??
大家帮忙 谢谢
------解决方案--------------------
begin
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '0 ', 'sysadmin ', '1 ',NULL);
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '1 ', 'superadmin ', '1 ',NULL);
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '2 ', 'genadmin ', '1 ',NULL);
commit;
end;
------解决方案--------------------
begin
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '0 ', 'sysadmin ', '1 ',NULL);
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '1 ', 'superadmin ', '1 ',NULL);
INSERT INTO ICO_ROLE (ID, ROLE_NAME, ROLE_TYPE, REMARK) VALUES ( '2 ', 'genadmin ', '1 ',NULL);
commit;
end;