随笔分类 -  Sql

说明nchar(10),char(10),nvarchar(10),varchar(10)
摘要:nchar(10)存10个英文,10个汉字,不自适应 char(10)存10个英文,5个汉字,不自适应 nvarchar(10)存10个英文,10个汉字,自适应 varchar(10)存10个英文,5个汉字,自适应 阅读全文

posted @ 2007-10-11 11:44 小乔的闺房

syscolumns
摘要:表名 TestTable 表字段 A,B,bigint,binary,bit,char,datetime,decimal,float,image,int,money,nchar,ntext,numeric,nvarchar,real,smalldatetime,smallint,smallmoney,sql_variant,text,timestamp,tinyint,uniqueidentif... 阅读全文

posted @ 2007-10-11 11:02 小乔的闺房

获得数据库里所有表的名称
摘要:(1)先学习这个 SELECT name, id, xtype, uid, info, status, base_schema_ver, replinfo, parent_obj, crdate, ftcatid, schema_ver, stats_schema_ver, type, userstat, sysstat, indexdel, refdate, vers... 阅读全文

posted @ 2007-10-10 12:48 小乔的闺房

获得数据库表的列数
摘要:select count(1) from syscolumns where id = object_id('yourTableName'); 阅读全文

posted @ 2007-10-05 14:25 小乔的闺房

导航