Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: SQL through perl is giving error

by remiah (Hermit)
on Sep 01, 2011 at 05:56 UTC ( #923567=note: print w/replies, xml ) Need Help??


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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://923567]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2018-11-21 09:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My code is most likely broken because:
















    Results (238 votes). Check out past polls.

    Notices?