刚看到这样一段代码
,他们的执行结果,都有汉字,为什么我的,des字段是?号,USE test
IF OBJECT_ID('paylog','U') IS NOT NULL
DROP TABLE paylogcreate table paylog (
gold int not null,
paydate datetime not null,
des varchar(10) not null
)
insert into paylog
select '80','2010-09-10 13:18','付费'
union all
select '100','2010-09-11 14:18','赠送'
union all
select '30','2010-09-12 14:20','赠送'
union all
select '40','2010-09-13 14:20','付费'
union all
select '90','2010-09-14 14:20','付费'
union all
select '30','2010-09-15 14:20','赠送'go
,他们的执行结果,都有汉字,为什么我的,des字段是?号,USE test
IF OBJECT_ID('paylog','U') IS NOT NULL
DROP TABLE paylogcreate table paylog (
gold int not null,
paydate datetime not null,
des varchar(10) not null
)
insert into paylog
select '80','2010-09-10 13:18','付费'
union all
select '100','2010-09-11 14:18','赠送'
union all
select '30','2010-09-12 14:20','赠送'
union all
select '40','2010-09-13 14:20','付费'
union all
select '90','2010-09-14 14:20','付费'
union all
select '30','2010-09-15 14:20','赠送'go
#2. 插入字符时需要加N, 例如: N'测试'
DROP TABLE paylogcreate table paylog (
gold int not null,
paydate datetime not null,
des varchar(10) not null
)
insert into paylog
select '80','2010-09-10 13:18','付费'
union all
select '100','2010-09-11 14:18','赠送'
union all
select '30','2010-09-12 14:20','赠送'
union all
select '40','2010-09-13 14:20','付费'
union all
select '90','2010-09-14 14:20','付费'
union all
select '30','2010-09-15 14:20','赠送'