About 16,400,000 results
Open links in new tab
  1. 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 …

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

  3. sql - SET versus SELECT when assigning variables? - Stack Overflow

    Oct 15, 2010 · What are the differences between the SET and SELECT statements when assigning variables in T-SQL?

  4. sql - Case in Select Statement - Stack Overflow

    Jan 7, 2013 · Using a SELECT statement with a searched CASE expression Within a SELECT statement, the searched CASE expression allows for values to be replaced in the result set …

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

    Sep 10, 2009 · The long answer (From T-SQL Fundamentals, Third edition, by Itzik Ben-Gan) This is an example: Imagine there is a order with a NULL orderid inside Sales.Orders table, so …

  6. sql - select * vs select column - Stack Overflow

    Without SELECT *: When you are using ” SELECT * ” at that time you are selecting more columns from the database and some of this column might not be used by your application.

  7. SQL Server SELECT into existing table - Stack Overflow

    I am trying to select some fields from one table and insert them into an existing table from a stored procedure. Here is what I am trying: SELECT col1, col2 INTO dbo.TableTwo FROM …

  8. SQL: Two select statements in one query - Stack Overflow

    Aug 13, 2015 · I want to select information from two SQL tables within one query, the information is unrelated though, so no potential joints exist. An example could be the following setup. …

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

    Jun 28, 2012 · 1 I have used this one on MySQL, MS Access and SQL Server. The id fields are the fields on wich the tables coincide, not necesarily the primary index.

  10. sql - Using SELECT result in another SELECT - Stack Overflow

    Apr 17, 2013 · Using SELECT result in another SELECT Asked 12 years, 8 months ago Modified 12 years, 8 months ago Viewed 370k times