About 33,100 results
Open links in new tab
  1. sql - How to SELECT FROM stored procedure - Stack Overflow

    May 4, 2017 · I have a stored procedure that returns rows: CREATE PROCEDURE MyProc AS BEGIN SELECT * FROM MyTable END My actual procedure is a little more complicated, which is why a …

  2. mysql - 'IF' in 'SELECT' statement - Stack Overflow

    SELECT id, amount FROM report I need amount to be amount if report.type='P' and -amount if report.type='N'. How do I add this to the above query?

  3. How do I perform an IF...THEN in an SQL SELECT?

    Sep 15, 2008 · The CASE statement is the closest to IF in SQL and is supported on all versions of SQL Server.

  4. sql - JOIN two SELECT statement results - Stack Overflow

    Is it possible to join the results of 2 sql SELECT statements in one statement? I have a database of tasks where each record is a separate task, with deadlines (and a PALT, which is just an INT of ...

  5. sql - How to rename columns with `SELECT`? - Stack Overflow

    Mar 5, 2009 · I have two tables with one identical column name, but different data. I want to join the tables, but access both columns (row["price"], row["other_price"]): How can I rename/alias one of …

  6. sql - Exclude a column using SELECT * [except columnA] FROM tableA ...

    SELECT * [except columnA] FROM tableA The only way that I know is to manually specify all the columns and exclude the unwanted column. This is really time consuming so I'm looking for ways to …

  7. sql - Update multiple rows using select statement - Stack Overflow

    Jun 28, 2012 · Update multiple rows using select statement Asked 13 years, 6 months ago Modified 7 years, 8 months ago Viewed 121k times

  8. sql - Case in Select Statement - Stack Overflow

    Jan 7, 2013 · I have an SQL statement that has a CASE from SELECT and I just can't get it right. Can you guys show me an example of CASE where the cases are the conditions and the results are from …

  9. How to select unique records by SQL - Stack Overflow

    How to select unique records by SQL Asked 16 years, 2 months ago Modified 2 years ago Viewed 749k times

  10. SQL "select where not in subquery" returns no results

    Sep 10, 2009 · select * from Common where common_id not in (select common_id from Table1) and common_id not in (select common_id from Table2) I know that there are orphaned records, but no …