随笔分类 -  Database

摘要:DECLARE @str  NVARCHAR(10) SET @str = '1, 2, 3, ' SET @str = LEFT(@str, LEN(@str)- 2) SELECT @str               Answer: '1, 2, ' (space after comma) Exp... 阅读全文
posted @ 2009-09-11 22:41 卜海清 阅读(188) 评论(0) 推荐(0)
摘要:This is very simple but effective script. It list all the table without primary keys. USE DatabaseName; GO SELECT SCHEMA_NAME(schema_id) AS SchemaName,name AS TableName FROM sys.tables WHERE OBJECTPRO... 阅读全文
posted @ 2009-08-28 02:19 卜海清 阅读(183) 评论(0) 推荐(0)
摘要:Database refactoring和一般意思上的Code Refactoring还是有许多不同的。 协议阶段准备开始研究一下。有关DB Refactoring的技术 下面的是我在InfoQ上听的Ambler做的一个技术讲座 http://www.infoq.com/presentations/ambler-database-refactoring Ambler是Agile Unified... 阅读全文
posted @ 2009-01-17 13:56 卜海清 阅读(223) 评论(0) 推荐(0)