声明临时表

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

posted on 2011-11-28 18:35  雨渐渐  阅读(142)  评论(0编辑  收藏  举报

导航