How to add a new column to a table in Postgres SQL?

To create a new column in an existing table, you use ALTER Table query with ADD COLUMN in it.

Sample Query - 

Alter table yt_records ADD COLUMN yt_channel varchar(100);
 

In the above query, we are adding a new column called yt_channel to an existing table yt_records

Leave a comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.