Skip to content

Instantly share code, notes, and snippets.

@chiragmongia
Created February 23, 2013 11:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiragmongia/5019485 to your computer and use it in GitHub Desktop.
Save chiragmongia/5019485 to your computer and use it in GitHub Desktop.
desc testing_table ;
+------------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+-------+
| username | varchar(30) | YES | | NULL | |
| roll_no | int(5) | YES | | NULL | |
| first_name | varchar(30) | YES | | NULL | |
| last_name | varchar(30) | YES | | NULL | |
+------------+-------------+------+-----+---------+-------+
1. alter table testing _table drop column name;
2. alter table testing_table change contact_name username varchar(30);
3. alter table testing_table add(first_name varchar(30), last_name varchar(30));
4. alter table testing_table modify roll_no int(5);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment