DB2的基本sql操作
来源:互联网 发布:平面图设计软件下载 编辑:程序博客网 时间:2024/04/30 03:21
1. create语句
create table personinfo( pno varchar(20) not null, pname varchar(20), primary key(pno));2. select 语句
select sname,num(sqy)from stuwhere sno>'121513'group by sno
[distinct,max,concat,convert等函数]或者
select * from stu where sno in (或者=) ( select sno from person where sno>‘121513’ )
1)插入一行
insert into student (sno,sname) values('121513','zhayefei')2)插入多行
insert into student(sno,sname) values ('123','zha'),('456','cha'),('789','Leo');
3)用select语句插入
insert into student(sno,sname)select concat(sno,'10'),concat(sname,'v') from student where sno>'121513'4. delete语句
delete from student where sno='121518'
5. update语句(两种方法)
update student set sname='Leo-zha' where sno='121513'或者
update( select * from student where sno='121513')set sname='zhayefei'
- DB2的基本sql操作
- db2的基本操作
- DB2 用到的基本SQL语句
- Db2数据库的基本操作命令
- db2 tablespace 基本操作
- DB2 Sequence基本操作
- DB2基本操作
- DB2数据库基本操作
- DB2基本命令操作
- SQL的基本操作
- SQL的基本操作
- SQL的基本操作
- SQL的基本操作
- sql的基本操作
- sql的基本操作
- SQL的基本操作
- sql的基本操作
- SQL的基本操作
- 用递归求二进制
- 十二周——银行系统(2)
- ios学习笔记之OC篇(一):复制对象的方法
- Ubuntu 12.04搭建Qt for Android环境
- 学习笔记:android下获取sdcard容量大小
- DB2的基本sql操作
- 教你启用Sql Server数据库的Sql server身份验证
- ADO.NET中的五个主要对象
- on-stackreplacement in v8
- Android切图注意事项
- Linux中C/C++编译添加头文件和库路径方式
- Python学习日志之三-----Python小应用示例
- Maven坐标和依赖(三)
- AcceptEx Function 函数中文帮助