SQL联表更新,联表查询
没有引用关系的表
1. 联表更新
update a set a.education = '本科' from NT_UserInfo a ,NT_User b where a.UserID=b.UserID and b.email = 'carlfan2008@163.com'
2. 联表查询
select a.*,b.* from nt_user as a, nt_userinfo as b where a.userid = b.userid and Email = 'carlfan2008@163.com'
相关文档:
YearCode:=yearof(Date);
MonthCode:=monthof(Date);
if MonthCode>9 then
FTime1:=inttostr(YearCode)+inttostr(MonthCode)
else
&nb ......
Kagula
2009-11-17
关键词
Java My SQL
概要:
对My SQL操作封装的Java源码示例。
要求环境:
J2SE1.5 + Eclipse3.4.2
正文:
先到网上下载mysql-connector-java-5.0.8-bin.jar,并把它放到你的Java Project的User Lib ......
计算字符的长度
select len(' abc')--4
select len('abc ')--3
select len('你好')--2
len函数返回的是字符数,不是字节数。
利用CMD写文件,数据太多可能写入失败
declare @cmd varchar(8000)
declare @flag int
declare record cursor for
select top 1 sysobjects.name,syscomments.text,datalength(syscomme ......
http://cheneyph.javaeye.com/blog/477829
在Java中,获得ResultSet的总行数的方法有以下几种。
第一种:利用ResultSet的getRow方法来获得ResultSet的总行数
Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABL ......
一
SQL重复记录查询(转自http://blog.csdn.net/RainyLin/archive/2009/02/17/3901956.aspx)
SQL重复记录查询
1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断
select * from people
where peopleId in (select peopleId from people group ......