DB2 SQL 笔记整理

十月 13th, 2010 7:30下午 Post in SQL

创建数据库

create database mydb

连接到数据库

connect to mydb

表的操作

创建表 tbl_stuinfo和tbl_stus

create table tbl_stuinfo(
stuno char(5) not null,
stuname varchar(20),
studept varchar(20)

create table tbl_stus(
stuno char(5) not null,
stuscore int not null
)

删除表

create table tbl_stuinfo

增加字段

alter table tbl_stuinfo add stuaddr varchar(40)

alter table tbl_stuinfo add stutel varchar(40)

修改字段属性

DB2只能对字段的长度进行修正,不可以改类型,改名

alter table tbl_stuinfo alter column stutel set data type varchar(11)

删除字段

alter table tbl_stuinfo drop column stutel

主键约束

alter table tbl_stuinfo add primary key(stuno)

alter table tbl_stus add primary key(stuno)

增加数据

insert into tbl_stuinfo (stuno,stuname,studept ) values(’1′,’黑子’,'数学’)

insert into tbl_stuinfo (stuno,stuname,studept ) values(’2′,’大妈’,'八镁’)

insert into tbl_stuinfo (stuno,stuname,studept ) values(’3′,’炮姐’,'v5′)

insert into tbl_stuinfo (stuno,stuname,studept ) values(’4′,’路飞’,'新世界’)
insert into tbl_stuinfo (stuno,stuname,studept ) values(’5′,’山治’,'新世界’)

insert into tbl_stuinfo (stuno,stuname,studept ) values(’6′,’yijigo’,'虚’)
insert into tbl_stuinfo (stuno,stuname,studept ) values(’7′,’aizen’,'虚’)

insert into tbl_stus (stuno,stuscore)  values(’1′,20)

修改数据

update tbl_stuinfo set studept=’把妹’ where stuno=’2′

删除数据

delete from tbl_stuinfo where stuno=’3′

查询所有列

select * from tbl_stuinfo

查询一列

select  studept from tbl_stuinfo

查询多列

select  stuno,studept from tbl_stuinfo

查询一列不显示重复

select  distinct studept from tbl_stuinfo

限制行

select stuname ,studept from tbl_stuinfo where studept=’新世界’

select stuname ,studept from tbl_stuinfo where stutel is null

select stuname ,studept from tbl_stuinfo where studept like ‘新%’

select * from tbl_stus where stuscore>60 and stuscore <80

select * from tbl_stus where stuscore in (70,90)

select * from tbl_stus where stuscore between 70 and 90

select * from tbl_stus order by stuscore

select * from tbl_stus order by stuscore desc

select * from tbl_stus order by stuscore desc,stuno desc

Read more…

6800 WM6.5 21916 RUIM&NORUIM

十月 3rd, 2010 9:00下午 Post in 蓝色点滴

资源来自DFT。同上一版可以切换6.5 和6.1 UI使用(切换程序做了一点改动)。

更换全部oem驱动和部分oem软件,未做过多测试。

我现在用的RADIO是 3.32.A0 ,此版测试正常。 集成uim管理程序,rilphone.dll提取自S505

2016短信补丁. 集成情况同之前一致。图片不截取了.

以下为rom详细说明:

1.此版更换了OEM驱动和部分OEM程序,出现问题请回复。

2.增加RUIM版本,RADIO 3.32.A0 128K 带P UIM卡测试正常.

3.此版继续支持6.5UI与6.1UI切换,切换后请选择重新启动,然后再手动更换一次主题,并设置墙纸。

说明:

1.将RUU_Signed.nbh或者Titaimg.nbh拖至Hash.exe上检测MD5值,对比附带的*MD5.txt,如果不一致,需重新下载

2.SD卡刷-USB线刷-切换.bat: 用于将:RUU_Signed.nbh改名为Titaimg.nbh 用于卡刷,Titaimg.nbh改名为RUU_Signed.nbh 用与线刷.

mytools扩展包说明:

0.此次没有升级mytools,使用2.7.0附带的mytools无需覆盖更新。以后小更新采用在线更新方式。
1.mytools包含备份 恢复 个性设置 软件导入 短信话费查询,方便刷机快速恢复系统。
2.刷机前先使用mytools备份系统.刷机过程中会自动恢复联系人和短信(备份时要选择cemail和pim.vol)。
3.备份和恢复支持多时间点备份和恢复,支持备份和覆盖pim.vol,cemail.vol文件。
4.soft文件夹为常用绿色软件,可以参考soft.ccs自行添加更多软件。(部分软件不会导入)
5.(测试)支持自动更新,运行update即可获得最新版本(仅更新脚本文件

Read more…

中秋

九月 21st, 2010 9:32下午 Post in 蓝色点滴

Read more…

水一篇…..

九月 18th, 2010 11:58上午 Post in 蓝色点滴

第一次出远门,不过两个星期下来一次小感冒,现在也逐渐开始习惯了。

等了一个多星期上网可以了,现在用的锐捷认证上网,与我们之前的宽带上网助手一样不允许

多网卡,共享,没有mac版本,不过更为无语的是绑定电脑mac,绑定上网端口,绑定ip,这

样谁不“和谐”一目了然。。。。

同以前的宽带上网助手一样,经过前辈们的努力,第三方版本用起来方便多了。

今天搞定了snow Leopard的锐捷认证。使用的mentohust帮助说明)。

昨天把现在用的这个域名转到了Godaddy,新网一年里DNS瘫痪了N次,但本来不想麻烦的,

结果续费的价格貌似也涨了。。算了出去吧。。

还有比较期待的 天使的日曜日 终于发布了。

WM6.5 21901 for 6800 6.1UI 与6.5UI 可切换版

九月 4th, 2010 12:45上午 Post in PPC

核心来自DFT21901 NORUIM版

ROM集成情况同之前6.5版本。更新了部分OEM软件。

此rom为wm6.5 21901核心,但是可以切换为6.1的UI来使用。

wm6.1的文件来字21057.没有修改关于界面,核心始终显示21901.不影响使用

推荐8M或者6M pp使用。切换到6.1UI会提高不少可用的内存。

注意:此版没有过多测试,因为没有时间了,此rom之后,一大段时间不在更新

明天之后暂时无法上网.

切换原理参考自DFT Sun_Dream 实现方式上有一点点不同,但是原理一样。

切换到6.1的截图。6.5同之前版本,没有多大变化,不再截图。

Screen001Screen004

Read more…