About 50 results
Open links in new tab
  1. sql server - WHERE in based on multiple columns - Database ...

    Sep 9, 2019 · I am trying to achieve something like this in sql server 2012. But this syntax does not exists. What are the alternatives to it and why does sql server does not support such syntactic …

  2. Get multiple columns from a select subquery

    Apr 3, 2012 · This one is applicable for sql server only for other databases we can use inner query within the select statement.

  3. mysql - How to use COUNT with multiple columns? - Database ...

    9 Obviously, COUNT(DISTINCT) with multiple columns counts unique combinations of the specified columns' values. However, one other important point is that a tuple is counted only if none of the …

  4. Using Same CASE WHEN Conditions For Multiple Query Columns

    Is there a "better" way to rewrite a SELECT clause where multiple columns use the same CASE WHEN conditions so that the conditions are only checked once? See the example below.

  5. sql server - How to select multiple columns but only group by one ...

    Jul 19, 2014 · In SQL Server you can only select columns that are part of the clause, or aggregate functions on any of the other columns. I've blogged about this in detail here.

  6. sql server - Select multiple columns as JSON in a single query ...

    Feb 11, 2019 · How can I combine several columns (of varying types, e.g. int, datetime, nvarchar) as a single JSON-formatted expression in a select query? For example, I have columns col1, col2 and …

  7. mysql - Can I combine the results from multiple columns into a single ...

    Oct 14, 2014 · I have a table with several columns which I want to SELECT: SELECT his_name , her_name, other_name FROM foo; Bu, I instead I want to combine the results all into a single …

  8. Sql Max value from multiple columns in Computed Column

    Dec 28, 2018 · Sql Max value from multiple columns in Computed Column Ask Question Asked 7 years, 1 month ago Modified 3 years, 5 months ago

  9. Multiple WHERE IN on multiple columns - Database Administrators …

    Jul 15, 2015 · I am not very experienced with sql queries and looking for an efficient way to perform the same WHERE IN condition on multiple columns. More specifically, i'm doing the following: SELECT …

  10. Select multiple columns in IF clause conditionally?

    Feb 12, 2020 · membersound 331 1 2 14 1 you can select different fields but you can't select different number of fields, you can use stored procedure with dynamic sql code of run different selects based …