Start learning MySQL.
// Create a database CREATE DATABASE db_name ; // Deleting a database DROP DATABASE db_name ; // display database show DATABASES; // Select Database Use db_name ; // display table show TABLES;
//Create a tableCREATE TABLECustomers (IDbigint( -) unsigned not NULLauto_increment, namevarchar( +) not NULL DEFAULT '0', PRIMARY KEY(ID)) ENGINE=InnoDBDEFAULTCHARSET=UTF8;//View Table StructureDESCCustomers//Delete a tableDROP TABLECustomers//Modify a field data type in a tableALTER TABLECustomers MODIFYCOLUMNNamevarchar( -) not NULL DEFAULT '0'After ID;//Modify a field name in a tableALTER TABLECustomers changeCOLUMNName Nicknamevarchar( -) not NULL DEFAULT '0'After ID;//Add New FieldALTER TABLECustomersADD COLUMNLast_Namevarchar( -) not NULL DEFAULT '0'After ID;//Delete a fieldALTER TABLECustomersDROP COLUMNNickname;
MySQL Command 1