I have 2 tables.
Attendance table with 2 columns and Records table with 1 column
+----------------------+
| Attendance |
+----------------------+
| EmployeeID | Hours |
+----------------------+
+--------------+
| Records |
+--------------+
| EmployeeID |
+--------------+
| 1 |
| 2 |
| 3 |
+--------------+
I want a query that will insert all employeeID from Records table into EmployeeID in the Attendance table with a value of 8 in Hours column.
Like this:
+----------------------+
| Attendance |
+----------------------+
| EmployeeID | Hours |
|----------------------|
| 1 | 8 |
| 2 | 8 |
| 3 | 8 |
+----------------------+
I can't understand the code that I searched so I end up asking :)
By the way, I'm using SQL Server.