public IColumnsListAggregation SubQuery(IStatementSelect select, string alias = "") { if (!string.IsNullOrEmpty(alias)) { alias = " as " + SuperSql.FormatColumnAlias(alias); } this.Raw('(' + select.GetSql(false) + ')' + alias); return(this); }
public IColumnsListSimple SubQuery(IStatementSelect select, string alias = "") { if (!string.IsNullOrEmpty(alias)) { alias = this.Parameters.AliasOperator + SqlBuilder.FormatColumnAlias(alias, this.Parameters); } this.Raw('(' + select.GetSql() + ')' + alias); return(this); }
public IColumnsListSimple SubQuery(IStatementSelect select, string alias = "") { if (!string.IsNullOrEmpty(alias)) { alias = " AS " + SqlBuilder.FormatColumnAlias(alias); } this.Raw('(' + select.GetSql(false) + ')' + alias); return(this); }
public WhereList In(string column, IStatementSelect query) { CreateExpression(Enums.WhereType.In, column, " IN (" + query.GetSql(true).ToString() + ")"); return(this); }
public static string GetSQLSelectExist(IStatementSelect sql) => "SELECT EXISTS (" + sql.GetSql(true) + ");";