1 login: mysql -u root -p
2 exit : quit
3 step of operation to mysql:
create a database : mysql> create database lwjbase;
then checked if success: mysql>show databases;
then changed to lwjbase: mysql> use lwjbase;
then create table : mysql>create table worker (nid INT UNIQUE,name VARCHAR(20),address VARCHAR(200),salary float,level int);
then insert data to : mysql>insert into worker values(100,'tom','beijing',2000.0,0);
then lookup data : mysql>select * from worker;
then delete data : mysql>delete from worker where nid=100;
then updata data : mysql>update worker set level=2,salary=6999.0 where nid=100;
then delete table : mysql>drop table lwjbase;
then delete datebase : mysql>drop datebase lwjbase;
4: three method to insert note
# line
"__ "line
/* content */
阅读(778) | 评论(0) | 转发(0) |