Search
 
SCRIPT & CODE EXAMPLE
 

SQL

psql filed name alter

ALTER TABLE table_name 
RENAME column_name TO new_column_name;
Comment

rename column postgres

ALTER TABLE customers 
RENAME COLUMN name TO customer_name;

ALTER TABLE customers
RENAME COLUMN phone TO contact_phone;
Comment

rename column postgres

ALTER TABLE distributors RENAME COLUMN address TO city;
Comment

how to update column name in psql

ALTER TABLE order_details
  DROP COLUMN notes;
Comment

how to update column name in psql

ALTER TABLE order_details
  RENAME TO order_information;
Comment

PREVIOUS NEXT
Code Example
Sql :: sql multiline comment 
Sql :: mysql sysdate 
Sql :: date to string sql 
Sql :: compare date in sql 
Sql :: mysql update set sum 
Sql :: show all public tables sql 
Sql :: alter table add column with default value 
Sql :: oracle user privileges 
Sql :: check all database size in gb mysql 
Sql :: ubuntu install postgresql 12 
Sql :: mysql safe mode 
Sql :: sql server select where date 
Sql :: mysql pretty date format 
Sql :: mysql check db size 
Sql :: sql server current date minus 5 years 
Sql :: oracle sessions_per_user 
Sql :: sql select between two dates 
Sql :: delete role postgres 
Sql :: sql drop database if exists 
Sql :: sql select where in list 
Sql :: select from describe sql 
Sql :: trim leading zeros in sql 
Sql :: order by sql 
Sql :: mysql timestamp to date 
Sql :: delete temp table if exists 
Sql :: insert query return id mysql 
Sql :: sql trim all spaces 
Sql :: change role postgres 
Sql :: select last 2 characters sql 
Sql :: mysql database is not starting in xampp 
ADD CONTENT
Topic
Content
Source link
Name
4+9 =