String sql = String.Format( "SELECT * FROM {0} WHERE {1} IN (SELECT {1} FROM {2} WHERE policyid={3})", maintable, key, policytable, policyid); 之前都是一段段来做,原来这么便捷的方法
String sql = String.Format(
"SELECT * FROM {0} WHERE {1} IN (SELECT {1} FROM {2} WHERE policyid={3})",
maintable, key, policytable, policyid);
之前都是一段段来做,原来这么便捷的方法