How to add and remove columns from an existing table in the database?
How to add and remove columns from an existing table in the database?
Hi, my self Ravi Vishwakarma. I have completed my studies at SPICBB Varanasi. now I completed MCA with 76% form Veer Bahadur Singh Purvanchal University Jaunpur.
SWE @ MindStick | Software Engineer | Web Developer | .Net Developer | Web Developer | Backend Engineer | .NET Core Developer
Ashutosh Kumar Verma
27-Sep-2021SQL Add column in existing Table :
To Add a column in existing table in SQL database we can use SQL ALTER command. The following SQL statement is used to Add a column in existing table.
Lets take a database table 'Student',
Now, the following SQL Statement is used to add a Column 'stuMarks' in above table,
Remove Column from existing table :
To remove a column from existing database table, used SQL ALTER command. The following SQL statement is used to remove or delete a column 'stuMarks' from existing above table,
In the above example 'stuMarks' column is deleted successfully.