SQL> desc product
Name Null? Type
----------------------------------------- -------- ----------------------------
P_CODE NOT NULL VARCHAR2(10)
P_DESCRIPT NOT NULL VARCHAR2(35)
P_INDATE NOT NULL DATE
P_QOH NOT NULL NUMBER(38)
P_MIN NOT NULL NUMBER(38)
P_PRICE NOT NULL NUMBER(8,2)
P_DISCOUNT NOT NULL NUMBER(5,2)
V_CODE NUMBER(38)
SQL> @ld_product.sql;
--sqlplus does nothing for this script--insert product
set linesize 500;
set sqlbl on;
INSERT INTO PRODUCT VALUES ('11QER/31','Power painter, 15 pal, 3-nozzle','03-Nov-13','8','5','109.99','0.00','25595');
INSERT INTO PRODUCT VALUES ('13-Q2/P2','7.25-in.pwr.saw blade','13-Dec-13','32','15','14.99','0.05','21344');
INSERT INTO PRODUCT VALUES ('14-Q1/L3','9.00-in.pwr.saw blade','13-Nov-13','18','12','17.49','0.00','21344');
INSERT INTO PRODUCT VALUES ('1548-QQ2','Hrd.cloth,1/4-in.,2x50','15-Jan-14','15','8','39.95','0.00','23119');
INSERT INTO PRODUCT VALUES ('1558-QW1','Hrd.cloth,1/2-in.,3x50','15-Jan-14','23','5','43.99','0.00','23119');
/*
set define off;
INSERT INTO PRODUCT VALUES ('2232/QTY','B&D jigsaw,12-in.blade','30-Dec-13','8','5','109.92','0.05','24288');
set define off;
INSERT INTO PRODUCT VALUES ('2232/QWE','B&D jigsaw,8-in.blade','24-Dec-13','8','5','99.87','0.05','24288');
set define off;
INSERT INTO PRODUCT VALUES ('2238/QPD','B&D cordless drill, 1/2-in.','20-Jan-14','12','5','38.95','0.05','25595');
INSERT INTO PRODUCT VALUES ('23109-HB','Claw hammer','20-Jan-14','23','10','9.95','0.10','21225');
INSERT INTO PRODUCT VALUES ('23114-AA','Sledge hammer, 12 lb.','02-Jan-14',' 8','5','14.40','0.05',' ');
INSERT INTO PRODUCT VALUES ('547?8-2T','Rat-tail file,1/8-in.fine','15-Dec-13','43','20','4.99','0.00','21344');
INSERT INTO PRODUCT VALUES ('89-WRE-Q','Hicut chain saw, 16 in.','07-Feb-14','11','5','256.99','0.05','24288');
INSERT INTO PRODUCT VALUES ('PVC23DRT','PVC pipe, 3.5-in., 8-ft','20-Feb-14','188','75','5.87','0.00',' ');
INSERT INTO PRODUCT VALUES ('SM-18277','1.25-in.metal screw,25','01-Mar-14','172','75','6.99','0.00','21225');
INSERT INTO PRODUCT VALUES ('SW-23116','2.5-in.wd.screw,50','24-Feb-14','237','100','8.45','0.00','21231');
INSERT INTO PRODUCT VALUES ('WR3/TT3','Steel matting, 4'x8'x1/6",.5" mesh','17-Jan-14','18','5','119.95','0.10','25595');
*/
答案 0 :(得分:0)
您需要在最后发出COMMIT才能将插入内容保存到数据库中。 你也可以:
SET AUTOCOMMIT ON:
告诉sqlplus如果你愿意,可以在每个语句后自动发出提交。可能有风险,因为你可以随后回滚一个混蛋。先阅读它。