About 31,300,000 results
Open links in new tab
  1. 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?

  2. How to set variable from a SQL query? - Stack Overflow

    1 My use case was that I wanted to set a variable to a string. All the other answers here show how to set a variable using the output of a SELECT statement. Here's how to do it with a simple string:

  3. How to turn IDENTITY_INSERT on and off using SQL Server 2008?

    How you were inserting a value on the identity column without realizing it isn't clear, but perhaps older versions of SQL Server would include it implicitly with all columns when explicit insert …

  4. sql server - Update multiple columns in SQL - Stack Overflow

    Jan 31, 2012 · update table set a=t2.a,b=t2.b etc which can be pretty tiresome to write if you have 100+ columns.

  5. sql - Declare Variable for a Query String - Stack Overflow

    I've been using SQL Server 2005 as well recently, and using a variable for query string replacement like the OP wants is not possible (generates syntax errors).

  6. sql - UPDATE from a SELECT - Stack Overflow

    In SQL Server, it is possible to insert rows into a table with an INSERT.. SELECT statement: INSERT INTO Table (col1, col2, col3) SELECT col1, col2, col3 FROM other_table WHERE sql …

  7. SQL Statement with multiple SETs and WHEREs - Stack Overflow

    0 Use a query terminator string and set this in the options of your SQL client application. I use ; as the query terminator. Your SQL would look like this;

  8. sql - Must declare the scalar variable - Stack Overflow

    SET @sql = CONCAT(N'SELECT ', @RowTo, ' * 5'); But in your case you should use proper parameterization rather than concatenation. If you keep using concatenation, you will expose …

  9. How to declare variable and use it in the same Oracle SQL script ...

    The question is about to use a variable in a script means to me it will be used in SQL*Plus. The problem is you missed the quotes and Oracle can not parse the value to number.

  10. sql - Set value to NULL in MySQL - Stack Overflow

    Feb 16, 2012 · I want a value to be set to NULL if nothing is put into the text box in the form I'm submitting. How can I make this happen? I've tried inserting 'NULL' but this just adds the word …