Linked Questions
179 questions linked to/from How do I UPDATE from a SELECT in SQL Server?
70
votes
1answer
40k views
Update rows from another table [duplicate]
I have a table with 2 columns, Country and Qty. the field country has distinct acronyms of all the countries. Now my job is to replace those acronyms with the actual country name. Now there is another ...
20
votes
3answers
12k views
Sql Update Query [duplicate]
I have a table T1 which contains three columns: Id, Name, Address
There is another table T2 which contains 2 columns Id, New_Address. Id column of T2 is same as of T1.
I need a query which will ...
15
votes
1answer
1k views
Update an entire single column with table joined query [duplicate]
I have a table that I just added a column to and now I am trying to find an easy way to update it.
select * from KioskGoals kg
inner join [TestDB].dbo.Kiosks k on kg.kioskID = k.Id
The joined table ...
8
votes
2answers
2k views
Mysql: Update table with select max of another table [duplicate]
I have 2 different database in my MySql server.
First table DB1.contacts:
id | name | code
1 | foo | 157
2 | foo | 95
3 | foo | 210
Second table DB2.paperworks:
id | name | contact_id
1 | ...
-2
votes
3answers
2k views
Update only in case where its not null [duplicate]
I want update a column(a) from table1 with select from table2 but making update only when in table2 existing column(b) is not null. I dont want use where statement (is not null) cause it will ...
4
votes
1answer
927 views
Update rows cell from another table by matching IDs [duplicate]
Hi i have two tables ...
Acctive table:
SELECT * FROM 36496839_radioamater.skladovekarty00006;
CISLO NAME
1 NULL
2 NULL
3 NULL (other cells)
4 ...
3
votes
2answers
1k views
Join and update same column sql server [duplicate]
I have 2 tables as :
TableA:
ID Value
1 A
2 B
TableB:
Rank Value
12 A
13 B
I need to join both tables on Value column and update Value column of TableB with TableA's ID column. ...
5
votes
1answer
772 views
SQL Server 2005 freezes (because of application), need logging [duplicate]
We have an application running ontop of our SQL Server 2005 instance and a couple of times a week this application (unanncounced) will cause the SQL Server to freeze. I can't even restart the SQL ...
-1
votes
1answer
426 views
Is it possible to execute update query in android using JDBC driver [duplicate]
I am trying to execute update query in android using JDBC Driver, but nothing is happening however insert query is working properly.
3
votes
1answer
535 views
UPDATE within a table from table name saved in the column [duplicate]
I have a little problem, but I'm sure it s not really complicated.
It's just hard to find the key word to describe the problem and find a solution
I want to update a column in a table using ...
-1
votes
1answer
44 views
Update rows from one table to another table based on Id [duplicate]
Both tables have a client_id column. Need to insert data from #LocalDashboardtable into T004_Dashboard when the client_id column are equal. i have tried this but it does't help shows an error "...
645
votes
5answers
539k views
C# Equivalent of SQL Server DataTypes
For the following SQL Server datatypes, what would be the corresponding datatype in C#?
Exact Numerics
bigint
numeric
bit
smallint
decimal
smallmoney
int
tinyint
money
Approximate Numerics
float
...
149
votes
10answers
683k views
SQL - Update multiple records in one query
I have table - config.
Schema:
config_name | config_value
And I would like to update multiple records in one query. I try like that:
UPDATE config
SET t1.config_value = 'value'
, t2.config_value ...
50
votes
6answers
127k views
Copy data from one existing row to another existing row in SQL?
I have a table full of tracking data for as specific course, course number 6.
Now I have added new tracking data for course number 11.
Each row of data is for one user for one course, so for users ...
45
votes
4answers
72k views
MySQL update a joined table
I want to update a table in a statement that has several joins. While I know the order of joins doesn't really matter (unless you you are using optimizer hints) I ordered them a certain way to be ...