About 14,400,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. 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.

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

    Cannot insert explicit value for identity column in table 'Baskets' when IDENTITY_INSERT is set to OFF.

  5. set default schema for a sql query - Stack Overflow

    A quick google pointed me to this page. It explains that from SQL Server 2005 onwards you can set the default schema of a user with the ALTER USER statement. Unfortunately, that means that you …

  6. How to assign an exec result to a sql variable? - Stack Overflow

    Feb 11, 2010 · How do you assign the result of an exec call to a variable in SQL? I have a stored proc called up_GetBusinessDay, which returns a single date. Can you do something like this: exec @

  7. How to add a column with a default value to an existing table in SQL ...

    Jun 21, 2016 · ADD [Column_Name] BIT NOT NULL Default ( 0 ) Here is another way to add a column to an existing database table with a default value. A much more thorough SQL script to add a column …

  8. SQL Server : set a variable in CASE statement - Stack Overflow

    May 3, 2017 · In T-SQL, CASE is an expression that returns a value - you cannot have code blocks in your CASE statement. See Martin's answer how to deal with that.

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