About 29,500,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

    SET @ModelID = (SELECT m.modelid FROM MODELS m WHERE m.areaid = 'South Coast'); Then you can use SELECT to show the value of @ModelID or use the variable into your code.

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

  4. sql - how to increase sqlplus column output length? - Stack Overflow

    Feb 7, 2015 · I have some queries to find out the ddl of some objects from a schema. The result columns I am getting are truncated in the middle of the queries. How can I increase the width …

  5. SQL Update from One Table to Another Based on a ID Match

    Oct 22, 2008 · The arguments for using MERGE (including those in the post from sqlblog.com linked above) might be compelling, but one thing to consider might be that according to …

  6. How do I set a column value to NULL in SQL Server Management …

    Jan 14, 2009 · Update myTable set MyColumn = NULL This would set the entire column to null as the Question Title asks. To set a specific row on a specific column to null use:

  7. sql - Declare a variable in a PostgreSQL query - Stack Overflow

    How do I declare a variable for use in a PostgreSQL 8.3 query? In MS SQL Server I can do this: DECLARE @myvar INT; SET @myvar = 5/ SELECT * FROM somewhere WHERE something …

  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 update Identity Column in SQL Server? - Stack Overflow

    Oct 3, 2013 · You can not update identity column. SQL Server does not allow to update the identity column unlike what you can do with other columns with an update statement. Although …

  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 …