Just a serious project, the software needs to use the database, and I can't even use the basic database statements,
So learn the basic use of MySQL before you learn Java EE.
Installation and Configuration
This is not much to say, basically follow the default installation MSI, the most important thing is to remember the configuration when the password set.
Basic statement
A basic principle is that MySQL's unique statement in the command line without a semicolon, the operation of the database general statement to use a semicolon.
Here is the basic statement:
Create DATABASE DatabaseName creates a db
Use DatabaseName to switch the current database
CREATE table TableName (name varchar () not null primary key auto_increment) Create a table
Show tables See what tables are in the current database, but don't see the data in the table, and remember ' table ' to add ' s '
Insert INTO TableName (name,email) values(' Tom ', ' [email protected] ') inserting data into the table
SELECT * from TableName Query the contents of the entire table, remember to have * number
update TableName set name=' Bigtom ' where id=1 changes the record of the database
Delete from TableName where id=1 deletes data