
SQL
Marky616379799
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
sql 将一个表中的字段值复制到另一个表的字段
--修改数据[MSSQL专用]update s set s.classId=sc.classId from student s,student_class sc where s.studentId=sc.studentId--修改数据[MySQL专用]update Student s,Student_Class sc set s.classId=sc.classId where s...2009-09-17 16:51:19 · 365 阅读 · 0 评论 -
Mysql 更改字段类型
1.更改Float字段类型to DecimalALTER TABLE 表名 MODIFY 字段名 decimal(10,2) not null default '0';如:ALTER TABLE invoice MODIFY TotalMoney decimal(10,2) not null default '0';2.添加字段alter table 表名 a...2009-04-24 13:51:27 · 347 阅读 · 0 评论 -
数据库索引使用说明
(一)深入浅出理解索引结构 实际上,您可以把索引理解为一种特殊的目录。微软的SQL SERVER提供了两种索引:聚集索引(clustered index,也称聚类索引、簇集索引)和非聚集索引(nonclustered index,也称非聚类索引、非簇集索引)。下面,我们举例来说明一下聚集索引和非聚集索引的区别: 其实,我们的汉语字典的正文本身就是一个聚集索引。比如,我们要查...原创 2009-11-28 15:36:49 · 184 阅读 · 0 评论 -
Sql 汇总
select count(*) from(select studentId as stuId, avg(score) as avgScore from evalResult where classId = 266 and evalItemType like '%認知發展→%' group by studentId) er where er.avgScore >3 and er.a...原创 2010-01-20 20:10:21 · 145 阅读 · 0 评论 -
SQL 批量替换字符串的方法
update table[表名] set Fields[字段名]=replace(Fields[字段名],'被替换原容','要替换成的内容') 如: admin@hcmcms方法一:update useraccount set userName = replace(userName,'@hcmcms','@aa');方法二:update useraccou...2010-09-07 09:40:37 · 316 阅读 · 0 评论 -
sql 基础知识
基础知识:创建表:create table A (........);查询记录:select * from A更新记录:update A set a.x=y where a.z=c插入记录: insert into A(x,y,z) values(......);删除某记录:delete [form] A where a.x =y [如果删除整表数据则...原创 2010-10-15 16:24:04 · 198 阅读 · 0 评论