关系数据库—mysql基础总结

1.学习资料

自己购买的资料:
[http://www.ydma.com/classroom/14/task/66](http://www.ydma.com/classroom/14/task/66)

2.学习总结

增加表
create table abc(
id int not null auto_increment,
title varchar(100) not null,
author varchar(40),
s-date date,
)primary key(id)

删除表
drop table abc

插入数据
insert into abc(id,title,author,s-date)
values(1,"xxx","张三",'2018-3-5')

连接
    select a.rid,a.authour,b.tch
    from tb a inter join tcout b
    on a.rid = b.rid

    or
    select ***
    from tb a,tcout b
    where a.rid = b.rid

加载
load date local infile 'dump.txt' into table mytb;
load date local infile 'dump.txt' into table mytb
field terminated by ":"
lines terminated by "\r"    

分组
select a.id ,count(*) from table a where a = "abc" group by a.id

排序
select a.id,a.name from table a where a='abc' order by a.id

3.问题及解决

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值