Here you will find a collection of basic MySQL statements that should prove useful for basic CRUDS operations (create, replace, update, delete, select). There may be some issues with the kind of quotes you use around your data. If you are having difficulties, try using singe quotes ( ' ) or tricky quotes ( ` -- on keyboard key next to number 1) around your data. One or the other is bound to work.
CREATE DATABASE :-
Will create a MySQL database
CREATE DATABASE database_name ;
CREATE TABLE :-
Create a table on the database you are currently logged into.
INSERT STATEMENTS :-
INSERT INTO table_name ( `col_A`, `col_B`, `col_C`) VALUES ( `col_A_data`, `col_B_data`, `col_C_data`) ;
REPLACE STATEMENTS :-
REPLACE INTO table_name ( `col_A`, `col_B`) VALUES ( `col A data`, `col B data`) ;
UPDATE STATEMENTS :-
UPDATE table_name SET col_B='new_data' WHERE col_A='reference_data' ;
The above commands will update a row's columns with the new values which are specified with in the SET of section as well as database row to update in specified by.
|