Older buildings are at a greater risk for damage in an earthquake. Newer buildings are more likely to be built according to seismic building codes.
Seismic upgrading of an existing building does not guarantee that the structure will not be damaged in an earthquake. Upgrading can greatly reduce the chances of catastrophic damage or collapse.
The costs to upgrade an existing building vary widely, depending on the size and complexity of the required work. In general, it is significantly less expensive to upgrade a building prior to an earthquake than it is to repair a damaged building after an earthquake.