How to add column in table in SQL ?

  • To add a column in already created table, one needs to use the ALTER command along with the ADD clause.
  • If in the query, it is not specified where the new column is to be added, then by default it will be added as a last column.
  • One can also add a new column at the first or even after a specific column of an already created table.
  • You can add one column or more than one columns at a time using a single SQL query.
  1. Tablename is the name of an already existing table to which you have to add a new column.
  2. Column_name is the name of the column which is to be added to an already existing table.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store