About 4,670,000 results
Open links in new tab
  1. 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. SELECT CAST( CASE WHEN Obsolete = 'N' or InStock = 'Y' THEN 1 ELSE 0 …

  2. In SQL Server, when should you use GO and when should you use …

    Sep 13, 2010 · 12 You should use a semi-colon to terminate every SQL statement. This is defined in the SQL Standards, Sure, more often than not SQL Server allows you to omit the statement …

  3. Combining "LIKE" and "IN" for SQL Server - Stack Overflow

    Is it possible to combine LIKE and IN in a SQL Server-Query? So, that this query

  4. When should I use semicolons in SQL Server? - Stack Overflow

    While checking some code on the web and scripts generated by SQL Server Management Studio I have noticed that some statements are ended with a semicolon. So when should I use it?

  5. SQL: IF clause within WHERE clause - Stack Overflow

    Sep 18, 2008 · Is it possible to use an IF clause within a WHERE clause in MS SQL? Example: WHERE IF IsNumeric(@OrderNumber) = 1 OrderNumber = @OrderNumber ELSE …

  6. SQL WITH clause example - Stack Overflow

    Sep 23, 2012 · The SQL WITH clause is basically a drop-in replacement to the normal sub-query. Syntax For The SQL WITH Clause The following is the syntax of the SQL WITH clause when …

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

  8. t sql - What is the use of GO in SQL Server Management Studio ...

    274 The GO command isn't a Transact-SQL statement, but a special command recognized by several MS utilities including SQL Server Management Studio code editor. The GO command …

  9. Find out the history of SQL queries - Stack Overflow

    Feb 12, 2013 · An update SQL query was executed on the server, which caused many problems later. How can I get the list of update queries executed in last 2 months, so that I can trace the …

  10. Generate sql insert script from excel worksheet - Stack Overflow

    May 29, 2013 · I have a large excel worksheet that I want to add to my database. Can I generate an SQL insert script from this excel worksheet?