Classification of SQL Statements (Autosaved)
Classification of SQL Statements (Autosaved)
| Tables_in_school |
+------------------+
| student |
+------------------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
| rollno | tinyint(4) | NO | PRI | NULL | |
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
Removing a column
To delete a particular column name, alter and drop is used
mysql> alter table student drop place;
Query OK, 0 rows affected (0.03 sec)
Records: 0 Duplicates: 0 Warnings: 0
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
+--------+---------------+------+-----+---------+-------+
| rollno | tinyint(4) | NO | PRI | NULL | |
+--------+---------------+------+-----+---------+-------+
+--------+----------------+--------+-------+------------+------------+-------------+-------+
+--------+----------------+--------+-------+------------+------------+-------------+-------+
+--------+----------------+--------+-------+------------+------------+-------------+-------+
+--------+----------------+--------+-------+------------+------------+-------------+-------+
+--------+----------------+--------+-------+------------+------------+-------------+-------+