PostgreSQL.add_primary_keys¶
- PostgreSQL.add_primary_keys(primary_keys, table_name, schema_name=None)[source]¶
Add a primary key or multiple primary keys to a table.
- Parameters:
primary_keys (str | list | None) – (List of) primary key(s) to be added.
table_name (str) – Name of the table.
schema_name (str | None) – Name of the schema; defaults to
None
.
See also
Examples for the method
get_primary_keys()
.