Difference between revisions of "ALTER TABLE"
Jump to navigation
Jump to search
(Created page with " ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns); * {{ALTER}} * {{SQL}}") |
|||
(11 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
+ | * https://www.postgresql.org/docs/current/sql-altertable.html | ||
+ | ALTER TABLE tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns); | ||
− | ALTER TABLE tablename | + | ALTER TABLE tablename OWNER TO "new-owner"; |
+ | REVOKE ALL ON accounts FROM PUBLIC; | ||
+ | ALTER TABLE … SET ([[toast]]_tuple_target = N) | ||
+ | == Related == | ||
+ | * [[List tables]]: <code>[[\dt]]</code> | ||
+ | * <code>[[Insert into]]</code> | ||
+ | * <code>[[Create user]]</code> | ||
+ | * <code>[[Must be owner of table]]</code> | ||
+ | == See also == | ||
* {{ALTER}} | * {{ALTER}} | ||
* {{SQL}} | * {{SQL}} | ||
+ | |||
+ | [[Category:SQL]] |
Latest revision as of 10:05, 4 November 2024
ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);
ALTER TABLE tablename OWNER TO "new-owner";
REVOKE ALL ON accounts FROM PUBLIC;
ALTER TABLE … SET (toast_tuple_target = N)
Related[edit]
See also[edit]
ALTER, ALTER DATABASE, ALTER TABLE, ALTER DEFAULT PRIVILEGES, ALTER MATERIALIZED VIEW
- SQL, NewSQL, RDMS: GraphQL (2015), SQLite,
select, insert
,select count
, Distributed SQL, TablePlus, Cache hit ratio,pg_stat_user_tables
,EXPLAIN
, Index (PostgreSQL), DDL, SQL/MED, Group by, List users, SQL Injection, SQLAlchemy,CREATE USER, CREATE ROLE, EXPLAIN, ALTER DATABASE, REVOKE, NOLOCK, NOWAIT, EXISTS
, Unique constraint,.sql
Advertising: