About 83,700 results
Open links in new tab
  1. sql server - SQL select from a select query - Stack Overflow

    I want to do a select request that perform a first select and then use that selection to perform a second select. I made a 1st version using a temp table but I would like to know - is there is a wa...

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

    Sep 15, 2008 · SELECT CASE WHEN Obsolete = 'N' or InStock = 'Y' THEN 1 ELSE 0 END as Saleable, * FROM Product CASE statements can be embedded in other CASE statements …

  3. Nested select statement in SQL Server - Stack Overflow

    SELECT name FROM agentinformation Doesn't the inner select statement create a result set which the outer SELECT statement then queries?

  4. sql - Exclude a column using SELECT * [except columnA] FROM …

    In your select statement, just highlight the referenced columns folder above and drag and drop it into the query window. It will paste all of the columns of the table, then just simply remove the …

  5. 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, …

  6. sql - How to do a Select in a Select - Stack Overflow

    Dec 18, 2014 · I have a table containing a unique ID field. Another field (REF) contains a reference to another dataset's ID field. Now I have to select all datasets where REF points to a …

  7. Add a row number to result set of a SQL query - Stack Overflow

    Jun 29, 2015 · 93 I have a simple select statement. I want to add a temporary column that will represent number the of rows in my result set. I tried this -

  8. 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 …

  9. sql - How to use index in select statement? - Stack Overflow

    Jul 6, 2011 · Lets say in the employee table, I have created an index(idx_name) on the emp_name column of the table. Do I need to explicitly specify the index name in select clause …

  10. 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 …