INSERT MAX(col)

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
kendall
Forum Regular
Posts: 852
Joined: Tue Jul 30, 2002 10:21 am
Location: Trinidad, West Indies
Contact:

INSERT MAX(col)

Post by kendall »

Hello,

I have a table in which i want to INSERT a VALUE in its column(NOT AUTO_INCREMENTED) based on its MAX value

CAN this be accomplished

Note: I declined using the auto_increment for a crucial reason...see this thread
lostboy
Forum Contributor
Posts: 329
Joined: Mon Dec 30, 2002 8:12 pm
Location: toronto,canada

Post by lostboy »

You can, the version of the db will dictate whether you can so it with a subselect or as two queries
Post Reply