Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

java Annotation Æ´×°SQLÓï¾ä

ÉùÃ÷×Ö¶ÎÓ³Éä
@Target(ElementType.FIELD)  
@Retention(RetentionPolicy.RUNTIME) 
public @interface FiledRef
{
    String fieldName();
}
ÉùÃ÷±íÓ³Éä
@Target(ElementType.TYPE)  
@Retention(RetentionPolicy.RUNTIME)
public @interface TableRef
{
    String tableName();
}
²âÊÔÀà
@TableRef(tableName = "MobDevice")
public class ReflectTest
{
    @FiledRef(fieldName = "ID")
    private Long id;
    @FiledRef(fieldName = "DEVICE_NAME")
    private String name;
    @FiledRef(fieldName = "DEVICE_CODE")
    private String code;
    public ReflectTest(Long id, String name, String code)
    {
        this.id = id;
        this.name = name;
        this.code = code;
    }
    public Long getId()
    {
        return id;
    }
    public void setId(Long id)
    {
        this.id = id;
    }
    public String getName()
    {
        return name;
    }
    public void setName(String name)
    {
        this.name = name;
    }
    public String getCode()
    {
        return code;
    }
    public void setCode(String code)
    {
        this.code = code;
    }
    /**
     * @description
     * @author zhangml
 


Ïà¹ØÎĵµ£º

java Á¬½Ó sql 2005 µÄ·½·¨

java Á¬½Ó sql 2005 µÄ·½·¨£º
 1¡£µ½Î¢Èí¹Ù·½ÍøÕ¾ÏÂÔØ2005µÄjdbc²¢½âѹ£¬»ñµÃÎļþsqljdbc.jar
2¡£¸´ÖÆÎļþsqljdbc.jarµ½jdkĿ¼\jdk1.5\jre\lib\extÏ¡£
 3¡£¿ªÊ¼-¡µ³ÌÐò-¡µsql server 2005-¡µÅäÖù¤¾ß-¡µSQL Server Configuration Manager¡£Æô¶¯sql 2005·þÎñ¡£
µã»÷ sql server2005ÍøÂçÅäÖýڵ㣬²¢Ñ¡ÖÐ&rd ......

×¥SQLÖ´ÐÐÓï¾äʱ¼äµÄ½Å±¾

select sql_text, spid, v$session.program, process
  from v$sqltext, v$session, v$process
  where v$sqltext.address = v$session.sql_address
  and v$sqltext.hash_value = v$session.sql_hash_value
  and v$session.paddr = v$process.addr
  and v$process.spid in (4335);
×¢Ò ......

Sql helperʹÓ÷½·¨

    public List<FirmAttachmentModel> LoadFirmAttachmentByFirmId(int FirmId, int pageIndex, int pageSize)
        {
            List<FirmAttachmentModel> result = new List<FirmAtt ......

SQL server 2008 ´´½¨Ö÷¼üΪ×ÔÔöÁеıí

ʹÓÃTranact-SQL ±àд´úÂëÀ´´´½¨Ò»¸öÐÂ±í£º
 
USE [OnlineJudge]
GO
/****** Object: Table [dbo].[User1] Script Date: 05/17/2010 14:05:06 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[User2](/*notice convert the tablename*/
[num] [int]IDENTITY(1,1) NOT N ......

SQL SERVER¶¨Ê±×÷ÒµµÄÉèÖ÷½·¨

 Èç¹ûÔÚSQL Server ÀïÐèÒª¶¨Ê±»òÕßÿ¸ôÒ»¶Îʱ¼äÖ´ÐÐij¸ö´æ´¢¹ý³Ì»ò3200×Ö·ûÒÔÄÚµÄSQLÓï¾äʱ, ¿ÉÒÔÓùÜÀí->SQL Server´úÀí->×÷ÒµÀ´ÊµÏÖ¡£
¡¡¡¡1¡¢¹ÜÀí->SQL Server´úÀí->×÷Òµ(°´Êó±êÓÒ¼ü)->н¨×÷Òµ
¡¡¡¡2¡¢Ð½¨×÷ÒµÊôÐÔ(³£¹æ)->Ãû³Æ[×Ô¶¨Òå±¾´Î×÷ÒµµÄÃû³Æ]->ÆôÓõķ½¿òÄÚÊǹ´ºÅ->
·ÖÀà´¦¿ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ