How to Alter and Drop a Table in SQL

In this article I am going to explain about how to alter and drop a table in SQL.
  • 1464

Introduction

In this article I am going to explain about how to alter and drop a table in SQL. ALTER TABLE statement is used to modify any table. Using this statement you can insert new column, delete column from any table. This statement is also part of DML (Data Manipulation Language).

Example

Fallowing Statement create a vipendra table in DATABASE

Clipboard02.jpg

Fallowing Statement alter vipendra table and add a new column

Clipboard04.jpg

Fallowing Statement fetch data from vipendra table

Clipboard06.jpg

Fallowing Statement alter vipendra table and delete a column

Clipboard08.jpg

Fallowing Statement fetch data from vipendra table

Clipboard10.jpg

Fallowing Statement delete table vipendra

Clipboard12.jpg

© 2013 dotNetheaven. All rights reserved.