About 17,600,000 results
Open links in new tab
  1. How to set variable from a SQL query? - Stack Overflow

    I'm trying to set a variable from a SQL query: declare @ModelID uniqueidentifer Select @ModelID = select modelid from models where areaid = 'South Coast' Obviously I'm not doing this right as it ...

  2. 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?

  3. sql - Using "IN" in a WHERE clause where the number of items in the …

    We recently changed our system to limit the size of the in-clauses and always use bound variables because this reduced the number of different SQL statements and thus improved performance. …

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

  5. How do I UPDATE from a SELECT in SQL Server? - Stack Overflow

    Feb 25, 2010 · 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 …

  6. sql - How to set multiple values inside an if else statement? - Stack ...

    Mar 29, 2016 · I'm trying to SET more than one value within the if else statement below, If I set one value it works, but if I set two values, it doesn't work: DECLARE @test1 varchar(60); DECLARE …

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

  8. 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 16 years, 10 months ago Modified 3 years, 4 months ago Viewed 1.5m times

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

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

  10. How to set a DateTime variable in SQL Server 2008?

    Oct 30, 2018 · SQL Server 2008 is not doing what I expected with DateTime. It doesn't let me set DateTime variables, no matter what date format I use. When I execute: DECLARE @Test AS …