in reply to Re^2: SQL through perl is giving error
in thread SQL through perl is giving error

You might try the trace features of DBI to see more of what is going on.

Replies are listed 'Best First'.
Re^4: SQL through perl is giving error
by remiah (Hermit) on Sep 01, 2011 at 05:56 UTC
    Suppose there is a table "mytable" with column col_pk as follows.
    col_pk ---- 1 2 3
    And update and insert sql as follows.
    update mytable set col_pk=4 where col_pk=3; insert into mytable (col_pk) values (3);
    If you run the sql above only once, it never yields error. But if you run the sql twice, it will yield error because there is already 4 in mytable.

    I'm not sure. Just guessing.