SQL 0 Basics, getting started with MySQL today
First of all, before is read "Buy SQL", check the next, the original people are not so read.
Read the "Buy a buckle" with me aloud!
Download
1, MySQL official website download comunity Server version
Only found in the zip format files, download need to configure, to use.
2. Install MSI package directly
This method is relatively simple, do not need to configure, there is a network disk resources, forget, back up
Using MySQL Workbench
There is a startup shortcut in Windows installed software
is obviously more humane than the traditional command-line window operation.
More practical operation, slowly to realize it
Last Picture:
Basic SQL Action Statements
1 Create TableStudents2 (3IdintUnsigned not NULLAuto_incrementPrimary Key,4NameChar(8) not NULL,5SexChar(4) not NULL,6AgetinyintUnsigned not NULL7 8 );9 #增Ten Insert intoStudentsValues(NULL, "Li", "male", -); One Insert intoStudentsValues(NULL, "Chen", "female", A); A - #查 - Select * fromstudents; the Select * fromStudentswhereSex="female"; - - #更新 - UpdateStudentsSetName=PigwhereSex="female"; + - #删 + Delete fromStudentswhereId= 5; A at /*modifications to a table after creation - ALTER TABLE - - Adding Columns - ALTER TABLE name add column list data type [after insertion position]; - in Modifying Columns - ALTER TABLE name change column Name column new name new data type; to + Delete Column - ALTER TABLE name drop column name; the * Renaming Columns $ ALTER TABLE name rename new table name;Panax Notoginseng - Delete entire table the drop table name; + A Delete Entire Database the drop database name; + */
Know SQL for a long time, and today finally practice the next, feel their own Meng Meng da ~
Getting started with MySQL