About 50 results
Open links in new tab
  1. 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 …

  2. INSERT INTO SET syntax in SQL Server - Stack Overflow

    Aug 7, 2011 · I come from mySQL to SQL Server. Doesn't the following syntax work in SQL Server? INSERT INTO table SET fil1="234", fil2="324" Is there an comparable statement in …

  3. sql - MySQL INSERT INTO table VALUES.. vs INSERT INTO table …

    May 14, 2009 · SET syntax will work, whereas the other one will. But in most practical cases, you're looping through a set of records to do inserts anyhow, though there could be some …

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

  5. How can I set an SQL Server connection string? - Stack Overflow

    May 8, 2017 · To build the connection string, you need to instantiate an object from that SqlConnectionStringBuilder and set their properties with the parameters you use to connect to …

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

  7. SQL - WHERE clause on each SET command in UPDATE?

    May 1, 2012 · I'm trying to create an SQL query in PHP to update a table. Is it possible to have a different WHERE clause for each affected row? eg something like: UPDATE table SET val=X …

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

  9. sql - 1 SET statement for multiple variables like declare statement ...

    Aug 18, 2014 · Is there a way to set all variables with one set statment, like you can with a declare statement? For example: Declare @Test VARCHAR(10), @Test2 VARCHAR(10), @T...

  10. How do I loop through a set of records in SQL Server?

    How do I loop through a set of records from a select statement? Say I have a few records that I wish to loop through and do something with each record. Here's a primitive version of my …