About 50 results
Open links in new tab
  1. sql - NOT IN vs NOT EXISTS - Stack Overflow

    Which of these queries is the faster? NOT EXISTS: SELECT ProductID, ProductName FROM Northwind..Products p WHERE NOT EXISTS ( SELECT 1 FROM Northwind..[Order Details] …

  2. What does the "@" symbol do in SQL? - Stack Overflow

    The @CustID means it's a parameter that you will supply a value for later in your code. This is the best way of protecting against SQL injection. Create your query using parameters, rather than …

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

  4. How to SUM two fields within an SQL query - Stack Overflow

    Feb 14, 2013 · I need to get the total of two fields which are within the same row and input that number in a field at the end of that same row. This is my code. Sum(tbl1.fld1 + tbl1.fld2) AS …

  5. SQL query to select dates between two dates - Stack Overflow

    Feb 26, 2011 · I have a start_date and end_date. I want to get the list of dates in between these two dates. Can anyone help me pointing the mistake in my query. select Date,TotalAllowance …

  6. How to query DATETIME field using only date in Microsoft SQL …

    Mar 19, 2014 · The query behaves differently for datetime/date/datetime2 types. Testing with 23:59:59.999 makes it even worse because depending on the datetype you get different …

  7. How do I obtain a Query Execution Plan in SQL Server?

    In Microsoft SQL Server how can I get a query execution plan for a query / stored procedure?

  8. How to use python variable in SQL Query in Databricks?

    Jun 4, 2022 · 5 I am trying to convert a SQL stored procedure to databricks notebook. In the stored procedure below 2 statements are to be implemented. Here the tables 1 and 2 are delta …

  9. Inserting multiple rows in a single SQL query? - Stack Overflow

    Jan 17, 2009 · In SQL Server 2008 you can insert multiple rows using a single INSERT statement.

  10. sql server - Recover unsaved SQL query scripts - Stack Overflow

    Feb 23, 2013 · How to recover the unsaved scripts if the SSMS crashes / unsaved tab gets accidentally closed?