How would I UPDATE these table entries with SQL?

Posted by CT on Stack Overflow See other posts from Stack Overflow or by CT
Published on 2010-05-24T03:29:26Z Indexed on 2010/05/24 3:30 UTC
Read the original article Hit count: 292

Filed under:
|
|
|

I am working on an Asset Database problem.

I enter assets into a database. Every object is an asset and has variables within the asset table. An object is also a type of asset. In this example the type is server.

Here is the Query to retrieve all necessary data:

SELECT asset.id
,asset.company
,asset.location
,asset.purchaseDate
,asset.purchaseOrder
,asset.value
,asset.type
,asset.notes
,server.manufacturer
,server.model
,server.serialNumber
,server.esc
,server.warranty
,server.user
,server.prevUser
,server.cpu
,server.memory
,server.hardDrive
FROM asset
LEFT JOIN server
    ON server.id = asset.id
WHERE asset.id = '$id'

How would I write a query to update an asset?

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql