Ibatis sql

sql: ibatis:
<select id="CommandParamSQLCounts" resultClass="java.lang.Long" resultSetType="SCROLL_INSENSITIVE">
SELECT COUNT(*) FROM BS_command_param WHERE param_name LIKE '%$ParamName$%'
</select>
<insert id="insertUserGroupPurviewSQL" parameterClass="HashMap">
INSERT INTO BaseDB_Purview
( UserGroupID, FunctionID,IsVisible )
VALUES ( #userGroupId#, #FunctionId#,#isVisible# )
</insert>
<update id="updateUserGroupVehicle" parameterClass="HashMap">
update MSC_Vehicle set GroupID=#userGroupId# where ID=#Id#
</update>
<delete id="deleteSubUserSQL" parameterClass="HashMap" >
DELETE
FROM BS_SUB_USER
WHERE BSU_ID IN ( SELECT ID
FROM F_EXTRACTCHILDSUBUSERIDBYPARENTSUBUSERID(#bsuId#) )
OR BSU_ID = #bsuId#
</delete>


--------------------------------
USE [WQNETGPSDB]
GO
/****** 对象: Table [dbo].[bs_sub_userClientPoint] 脚本日期: 01/12/2011 15:15:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[bs_sub_userClientPoint](
[ID] [bigint] IDENTITY(1,1) NOT NULL,
[MarkName] [nchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[Longitude] [float] NULL,
[Latitude] [float] NULL,
[BsSubID] [bigint] NULL,
[Description] [nchar](50) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_bs_sub_userClientPoint] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
--开始
GO
SET IDENTITY_INSERT bs_sub_userClientPoint ON
GO
SET ANSI_PADDING on


BEGIN TRAN
INSERT INTO [dbo].[bs_sub_userClientPoint]([ID], [MarkName], [Longitude], [Latitude], [BsSubID], [Description])
VALUES(1, '珠江新城 ', 114.4141, 23.060451, 1171, null )


INSERT INTO [dbo].[bs_sub_userClientPoint]([ID], [MarkName], [Longitude], [Latitude], [BsSubID], [Description])
VALUES(2, '中国广西 ', 110.578584814453, 25.7232593046875, 1171, null )


INSERT INTO [dbo].[bs_sub_userClientPoint]([ID], [MarkName], [Longitude], [Latitude], [BsSubID], [Description])
VALUES(3, '王东海 ', 113.140575292969, 26.0472760273437, 1171, null )


IF @@ERROR = 0
COMMIT TRAN
ELSE
ROLLBACK TRAN
--关闭
GO
SET IDENTITY_INSERT bs_sub_userClientPoint OFf

--------drop table bs_sub_userClientPoint
select *From bs_sub_userClientPoint
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值