I'm getting an error in SQL command not properly ended

前端 未结 5 644
梦毁少年i
梦毁少年i 2021-01-17 17:36

when I enter this

INSERT INTO works_on
(essn, pno, hours)
values
(\'123456789\', 1, 32.5),
(\'123456789\', 2, 7.5),
(\'666884444\', 3, 40.0),
(\'453453453\',         


        
5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-17 17:50

    try take a look at this by ShoeLace

    Oracle SQL uses a semi-colon ;  as its end of statement marker.
    
    you will need to add the ; after bother insert statments.
    
    NB: that also assumes ADODB will allow 2 inserts in a single call.
    
    the alternative might be to wrap both calls in a block,
    
        BEGIN
              insert (...) into (...);
              insert (...) into (...);
        END;
    

提交回复
热议问题