Executing SQL Statements

  1. Construct an operation statement and use %s as a placeholder. During execution, psycopg2 will replace the placeholder with the parameter value. You can add the RETURNING clause to obtain the automatically generated column values.
  2. The cursor.execute method is used to perform operations on one row, and the cursor.executemany method is used to perform operations on multiple rows.
Feedback
编组 3备份
    openGauss 2024-05-07 00:46:52
    cancel