摘要: CREATE PROCEDURE ProductPromotion_Select @ProductID int AS SELECT ProductID, ProductName, SUBSTRING(Description, 1, 150) + '...' AS Description FROM Products WHERE ProductID IN ( SELECT TOP 5 details2... 阅读全文
posted @ 2008-04-02 06:00 Vincent Yang 阅读(303) 评论(0) 推荐(0) 编辑
摘要: Ref: http://www.udel.edu/evelyn/SQL-Class3/SQL3_self.html A self-join is a query in which a table is joined (compared) to itself. Self-joins are used to compare values in a column with other values in... 阅读全文
posted @ 2008-04-02 05:19 Vincent Yang 阅读(779) 评论(0) 推荐(0) 编辑