Jandren

  博客园 :: 首页 :: 新随笔 :: 联系 :: :: 管理 ::

2010年7月6日

摘要: 首先创建两个表: CREATE TABLE [dbo].[tb_orderdetail]([id] [int] NOT NULL,[OrderId] [int] NULL,[ProductId] [int] NULL,[UnitPrice] [decimal](18, 3) NULL,[Quanti... 阅读全文
posted @ 2010-07-06 13:57 Jandren 阅读(218) 评论(0) 推荐(0)

摘要: 1,IsNull函数,Cast函数 IsNull(,) Cast( as ) select tb_orderdetail.*,IsNull(Cast((select min(OrderDate) From tb_orders Where tb_orders.id = tb_orderdetail.O... 阅读全文
posted @ 2010-07-06 10:53 Jandren 阅读(187) 评论(0) 推荐(0)