0
Follow
0
View

Q: Mechanism after data is successfully added to sql

lheleven 注册会员
2023-02-28 05:24

Is it autoincrement? Let's look at

csl875021 注册会员
2023-02-28 05:24
  • Do you have this set in your entity:

img

  • INPUT
if you want to assign manually

img

yaogunlong 注册会员
2023-02-28 05:24

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > normally, when the SQL executed successfully a add data operation, the database will be automatically for the new data is assigned a unique ID(such as on the ID). This ID is usually returned to your code as a SQL return value or by some other means(such as a trigger or stored procedure), and you can update the ID into your object in your code.

In some cases, such as with the ORM framework or other database access tools, this ID update may be done automatically by the framework or tool without requiring you to explicitly update in the code.

If you don't know enough about your application's database operations, you can keep asking me

About the Author

Question Info

Publish Time
2023-02-28 05:23
Update Time
2023-02-28 05:23