you can join both tables even on
SET a.marks = b.marks
FROM tempDataView a
INNER JOIN tempData b
ON a.Name = b.Name
- SQLFiddle Demo
for faster performance, define an
INDEX on column
marks on both tables.
SET marks =
FROM tempData b
WHERE tempDataView.Name = b.Name
- SQLFiddle Demo
- How can I do an UPDATE statement with JOIN in SQL Server?
- SQL update query using joins
- how can I Update top 100 records in sql server
- I want to use CASE statement to update some records in sql server 2005
- How to update and order by using ms sql
- Split function equivalent in T-SQL?
- How to calculate age (in years) based on Date of Birth and getDate()
- Conditional WHERE clause in SQL Server
- Convert Month Number to Month Name Function in SQL
- get a comma delimited string from rows [duplicate]
- Find all tables containing column with specified name – MS SQL Server
- SQL Server Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, =
- Selecting data from two different servers in SQL Server
- Truncate (not round) decimal places in SQL Server
- Multi-statement Table Valued Function vs Inline Table Valued Function
- Most efficient way in SQL Server to get date from date+time?
- Convert varchar into datetime in SQL Server
- Creating an index on a table variable
- Calculating distance between two points (Latitude, Longitude)
- Using the result of an expression (e.g. Function call) in a stored procedure parameter list?
- Add Foreign Key relationship between two Databases
- converting Epoch timestamp to sql server(human readable format)
- Formatting Numbers by padding with leading zeros in SQL Server
- Parse comma-separated string to make IN List of strings in the Where clause
- T-SQL Cast versus Convert
- SQL Server – How to lock a table until a stored procedure finishes
- Reference alias (calculated in SELECT) in WHERE clause
- How do I delete from multiple tables using INNER JOIN in SQL server
- Splitting delimited values in a SQL column into multiple rows
- How to drop SQL default constraint without knowing its name?
- Which SQL query is faster? Filter on Join criteria or Where clause?
- Bulk DELETE on SQL Server 2008 (Is there anything like Bulk Copy (bcp) for delete data?)
- Dynamically create columns sql
- SQL – Subtracting a depleting value from rows
- Is there a performance difference between CTE , Sub-Query, Temporary Table or Table Variable?
- SQL: parse the first, middle and last name from a fullname field
- How do I prevent a database trigger from recursing?
- How to get the identity of an inserted row?
- SELECT FOR UPDATE with SQL Server
- SQL comments on create table on SQL Server 2008
- SQL Server equivalent to MySQL enum data type?
- How to select only the first rows for each unique value of a column?
- Unordered results in SQL
- SQL Server (TSQL) – Is it possible to EXEC statements in parallel?
- Find min and max for subsets of consecutive rows – gaps and islands
- SQL “between” not inclusive
- Can an INNER JOIN offer better performance than EXISTS
- Using PIVOT in SQL Server 2008
- How to combine results of two queries into a single dataset
- SQL Server 2005 and temporary table scope