Difference between revisions of "ALTER TABLE"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
ALTER TABLE tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns); | ALTER TABLE tablename ADD [[CONSTRAINT]] constraintname UNIQUE (columns); | ||
− | ALTER TABLE tablename OWNER TO | + | ALTER TABLE tablename OWNER TO "new-owner"; |
* [[List tables]]: <code>[[\dt]]</code> | * [[List tables]]: <code>[[\dt]]</code> |
Revision as of 17:01, 14 December 2022
ALTER TABLE tablename ADD CONSTRAINT constraintname UNIQUE (columns);
ALTER TABLE tablename OWNER TO "new-owner";
See also
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: