首页 / JAVA / sql 生成javabean实体
sql 生成javabean实体
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了sql 生成javabean实体,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2136字,纯文字阅读大概需要4分钟。
内容图文
select a.name,c.name,b.name,
‘private String ‘+lower(c.name)+‘;‘
from sysobjects a, systypes b, syscolumns c
where a.xtype = ‘u‘
and a.id = c.id
and b.xtype = c.xtype
and b.name <> ‘SYSNAME‘
and a.name=‘T_EVALUATION‘
order by c.id;
select ‘private String ‘ || lower(c.COLUMN_NAME) ||‘;‘ from user_tab_columns c where c.table_name=‘A_JZZ‘
select a.name,c.name,b.name,
‘private String ‘+lower(c.name)+‘;‘
from sysobjects a, systypes b, syscolumns c
where a.xtype = ‘u‘
and a.id = c.id
and b.xtype = c.xtype
and b.name <> ‘SYSNAME‘
and a.name=‘T_EVALUATION‘
order by c.id;
select ‘private String ‘ || lower(c.COLUMN_NAME) ||‘;‘ from user_tab_columns c where c.table_name=‘A_JZZ‘
create function PoNumber(@a datetime) returns varchar(50)
begin
declare @id varchar(50),@i int
select top 1 @id=pono from dbo.po where left(pono,8)= convert(varchar(8),@a,112) order by pono desc
if @@rowcount=0
return convert(varchar(8),@a,112)+‘001‘
set @i= rtrim(right(@id,3)) +1
set @id=rtrim(@i)
return convert(varchar(8),@a,112)+right( ‘000‘+@id ,3 )
end
select aa.*,
case when cast(aa.ProduceSize as decimal(9,2)) > 0 then aa.ProduceSize + ‘??‘
when cast(aa.ProduceSize2 as decimal(9,2)) > 0 then aa.ProduceSize2 + ‘??‘
when cast(aa.ProduceSize as decimal(9,2)) = 0 and cast(aa.ProduceSize2 as decimal(9,2)) = 0 then aa.ProduceSize + ‘??‘
else aa.ProduceSize end wwwww,
bb.LICENCEID aaaaa,bb.zhuanyiliang,
cast((cast(aa.ProduceSize as decimal(9,2))-
cast(case when bb.zhuanyiliang IS null or bb.zhuanyiliang IS NULL then ‘0‘ else bb.zhuanyiliang end as decimal(9,2))
) as nvarchar) + ‘??‘ ccc
from (
select LicenceID,LicenceName,Address,i.conname,isnull(ProduceSize,0) ProduceSize,isnull(ProduceSize2,0)ProduceSize2,CertificalTime,PeriodTime
from T_Licence left join T_COMMON_INFO i on T_Licence.RegionCode= i.CONCODE and i.objtype=‘101‘) aa
left join (
select LicenceID,SUM(cast(DangerCount as int)) as zhuanyiliang from
T_TranferDetail group by CORPID,LicenceID) bb
on aa.LICENCEID = bb.LICENCEID;
select (cast(‘22.0‘ as decimal(9,2))- cast(‘12.00‘ as decimal(9,2))) ccc;
原文:https://www.cnblogs.com/lovelanglangyou/p/9045300.html
内容总结
以上是互联网集市为您收集整理的sql 生成javabean实体全部内容,希望文章能够帮你解决sql 生成javabean实体所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。