您的位置:首页 > 数据库

数据库的基本操作(增删改查)

2013-09-02 12:25 351 查看
数据库增删改查新增(不指定列名) insert (into可省)[User] values('成员','123',23,GETDATE())新增(指定列名) insert [User] (u_name,u_pwd,u_age,u_head) values ('成员','123',23,'head.jpg')
删除 delete [User] where u_name='chengyuan'
修改 update [User] set u_name='成员2',u_pwd='1234'     where u_name ='成员'and u_pwd='123'
查询  select * from Article where atitle like '12_'      select * from Article where atitle like '%C#'      select * from Article where atitle like '%C#%[0-9]'      select * from Article where atitle like '%C#%[^0-9]'select * from Article where atitle like '12_'and atile like '%C%'
聚合函数: Count(); sum();max();min();avg()
truncate--除了清空所有表数据,还可以重置标识
表连接 Inner Join
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: