About 51 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. sql server - What does "+=" mean in T-SQL - Stack Overflow

    Aug 16, 2012 · The same as many other programming languages - append (or add depending on the variable's datatype, but append in this case) to the existing value. E.g. if the value of @myvariable is …

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

  4. select - SQL SET statement - Stack Overflow

    Dec 21, 2015 · Your knowledge of SQL should include that it is a set-based language (pun intended) and is intended to work with an optimizer. You appear to be using SQL to write procedural code. …

  5. SQL UPDATE WHERE IN (List) or UPDATE each individually?

    Oct 19, 2015 · UPDATE table1 SET somecolumn = 'someVal' WHERE ID IN (SELECT ID FROM @definedTable); In the above, @definedTable is a SQL 'User Defined Table Type', where the data …

  6. 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;

  7. How do I set a column value to NULL in SQL Server Management Studio?

    Jan 14, 2009 · How do I set a column value to NULL in SQL Server Management Studio? Asked 17 years ago Modified 3 years, 6 months ago Viewed 1.5m times

  8. SQL set values of one column equal to values of another column in the ...

    Oct 25, 2016 · I need to write a query which will set all the NULL rows for column B equal to the values in column A. I have tried this example but the SQL in the selected answer does not execute because …

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

  10. sql - Adding an identity to an existing column - Stack Overflow

    Jun 26, 2009 · I need to change the primary key of a table to an identity column, and there's already a number of rows in table. I've got a script to clean up the IDs to ensure they're sequential starting at 1,...