Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mysql> create table foo (id int(10) primary key auto_increment);
- Query OK, 0 rows affected (0.22 sec)
- mysql> alter table foo add column bar varchar(12);
- Query OK, 0 rows affected (0.37 sec)
- Records: 0 Duplicates: 0 Warnings: 0
- mysql> insert into foo set bar="BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH";
- Query OK, 1 row affected, 1 warning (0.00 sec)
- mysql> select * from foo;
- +----+--------------+
- | id | bar |
- +----+--------------+
- | 1 | BLAHBLAHBLAH |
- +----+--------------+
- 1 row in set (0.00 sec)
- mysql> alter table foo modify bar varchar(256);
- Query OK, 1 row affected (0.05 sec)
- Records: 1 Duplicates: 0 Warnings: 0
- mysql> select * from foo;
- +----+--------------+
- | id | bar |
- +----+--------------+
- | 1 | BLAHBLAHBLAH |
- +----+--------------+
- 1 row in set (0.00 sec)
- mysql>
Add Comment
Please, Sign In to add comment