c# 构造sql语句

String sql = String.Format(
                "SELECT * FROM {0} WHERE {1} IN (SELECT {1} FROM {2} WHERE policyid={3})",
                maintable, key, policytable, policyid);

之前都是一段段来做,原来这么便捷的方法
posted @ 2007-07-04 15:32  ahuo  阅读(482)  评论(0编辑  收藏  举报