create database MW_Household go use MW_Household create table TBL_MoneyType( idx int primary key identity(1,1), moneytype nvarchar(50) ) go insert into TBL_MoneyType values('ìýÑÑ'); go insert into TBL_MoneyType values('õóÐÃ'); go create table TBL_Category( idx int primary key identity(1,1), moneytype int, category nvarchar(200) constraint TBL_Category_moneytype_FK foreign key (moneytype) references TBL_MoneyType(idx) ) go insert into TBL_Category values(1,'ìéÚõ'); go insert into TBL_Category values(2,'ìéÚõ'); go create table TBL_AccountBook( idx bigint primary key identity(1,1), moneytype int, category int, moneyday varchar(8), contents nvarchar(200), money decimal(18,0) constraint TBL_AccountBook_moneytype_FK foreign key (moneytype) references TBL_MoneyType(idx), constraint TBL_AccountBook_category_FK foreign key (category) references TBL_Category(idx) ) select * from TBL_AccountBook where moneyday between '20130128' and '20130129' insert into TBL_AccountBook (moneytype,category,moneyday,contents,money)values('1','1','20130128','test','123123')