[MySql] How to add/delete a column from commandline

Following command is used to delete a column from a table:

ALTER TABLE <table_name> DROP COLUMN <column_name>;



Following command is used to add a column in table:

ALTER TABLE <table_name> ADD <column_name> <datatype> ;


[MySql] How to export MySql database schema using command line

Following command dumps MySql database's schema into a file:


mysqldump -u<username>i -p<password> -h<host> --databases <database1> --no-data > dump.sql

Above command exports single or multiple databases into dump.sql. This only exports database schema without any table contents.


This exported schema can be restored using following command:


mysql -u<username>i -p<password> -h<host> <database_name> < dump.sql

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .