• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Insert value after default value column in prepare-execute

Resolved: Insert value after default value column in prepare-execute

0
By Isaac Tonny on 03/04/2023 Issue
Share
Facebook Twitter LinkedIn

In this post, we will see how to resolve Insert value after default value column in prepare-execute

Question:

I have a table where i am inserting values using prepare and execute statements.
As seen above, I use the default trunc(SYSDATE) for the date column. I need to pass the values for other 3 columns though execute statement.
I am not sure how to pass the value to region after the default date column using execute.
Will above statement work? OR is there any kind of placeholder that i can use in execute for date (something like below)?

Best Answer:

The bind variables are being bound to the ? placeholders. It does not matter where they are in the statement or what is between the bind variables within the statements.
  • The first variable is bound to the first ?.
  • The second variable is bound to the second ?.
  • The third variable is bound to the third ?.
  • Etc.

The Perl code does not need to know about the INSERT statement, it just needs to know how many ?s (anonymous bind variables) there are in the statement and provide one value for each of them.

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com

oracle perl sql
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How to stop a thread that has a blocking function from easygui in python

05/04/2023

Resolved: Removing null keys from a json array of objects

05/04/2023

Resolved: How can I generate at compile-time a separate OpenAPI Swagger.json file for each Controller in my ASP.NET project?

05/04/2023

Comments are closed.

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.