In this article i will show you how you can add new column, Remove/Delete/Drop existing column and modify table column name in an existing sql server database table. So for this first create a new database in ms sql server and add a table.
Add Column: Now we will check query for adding a new column.
Now run the query to check the output.
Remove/Delete/Drop Column: In this we will check how we can remove a specific column using query.
Now run the above query and check the output. Here you can we Colum2 and Colum4 have been removed.
Modify Column: Now we will check how we can rename the column name using sql query. for modifying column name we will user sp_Raname to rename the column name of the table.
In above query TestTable is the table name. Now lets check the table.
0 comments:
Please let me know your view