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

你可能感兴趣的:(sql,ibatis,脚本,F#,Go)