Chinaunix首页 | 论坛 | 博客
  • 博客访问: 376715
  • 博文数量: 214
  • 博客积分: 770
  • 博客等级: 军士长
  • 技术积分: 1969
  • 用 户 组: 普通用户
  • 注册时间: 2012-04-08 01:22
文章分类

全部博文(214)

文章存档

2013年(110)

2012年(104)

我的朋友

分类: Mysql/postgreSQL

2012-12-21 23:52:06

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 */
阅读(691) | 评论(0) | 转发(0) |
0

上一篇:mysql learning note

下一篇:我的纸质书目

给主人留下些什么吧!~~