Inserting all rows from a select statement is a fairly common operation. You may be transferring the contents of one table to another or performing a complex multi-joined select and moving those values to another temporary table. The basic statement goes something like this:
1 2 3 | INSERT INTO table1 (column1) SELECT col1 FROM table2 |
You can modify this for your specific purposes like so:
1 2 3 | INSERT INTO AccessLog (UserId, PageId, AccessTime) SELECT UserId, 5, now() FROM Users |