1. varchar
2. 不可以
3. 数据库本身没有
4. http://www.meidi.net/Article/chengxu/asp/200506/1083.html
5. http://www.hbca.com.cn/e-goverment/client/help/concepts/hash.htm

解决方案 »

  1.   

    等等,不好意思还有一个问题,就一块发了。以下是我写的一些代码,提示有些问题,请高手解决一下。
    作用是当用户新建表,存储过程,触发器的时候,会把信息集中写进 TableName 表中。Create Table TableName --存放自己创建的表的所有信息(有问题,不能添加信息,有重复键出现,但一条数据一条数据添加没有问题)
    (
     IDCode char(3) DEFAULT dbo.f_TableNameIDCode(), 
     Name varchar(30),
     Xtype char(2),
     Crdate datetime,
     Res varchar(255),
       Constraint PK_TableName Primary Key (IDCode)
    )
    Go
    Create Function f_TableNameIDCode() --自动加一函数(用户创建信息表)
     Returns char(3)
    As
     Begin
    Return(Select Right(1000001 + Isnull(Right(Max(IDCode),3),0),3) 
      From TableName With(Xlock,Paglock))
     End
    Go
    Create Procedure pr_TableName_View
     As
      Begin
        Truncate Table TableName
        Insert Into TableName([Name],Xtype,Crdate) 
            Select Convert(varchar(30),[name]),xtype,crdate From sysobjects 
                          Where (xtype = 'U') Or ([name] Like 'pr_%') Or([name] Like 'tr_%') Or ([name] Like 'vW_%') Order By xtype
      End
    Go
    Exec pr_TableName_View
    Select * From TableName
    Drop Table TableName
    Drop Function f_TableNameIDCode
    Drop Procedure pr_TableName_View