声明临时表
declare @temp_table table
( bookID VARCHAR(10) primary key, book_price float default null, bookName varchar(50) )
insert into @temp_table values('1',50,'c#')
insert into @temp_table values('2',null ,'c')
select bookID AS '书的编号',isnull(book_price,0) as '书的价格' from @temp_table