Hi,
In my table I have a primary key column proposaid which will take values like
x6a1
x6a2
.
.
.
x6a10
.
.
In order to insert a unique proposalid (kind of auto increment but with varchar type), I was doing
select max(proposalid) from proposalinfo;
But now I found that once proposalid reaches x6a10, the maximum proposalid I get everytime is x6a9. So, my logic fails. Could anyone tell me how to get the last inserted row so that I can get the last proposalid being inserted.
or would any other logic works better?
In my table I have a primary key column proposaid which will take values like
x6a1
x6a2
.
.
.
x6a10
.
.
In order to insert a unique proposalid (kind of auto increment but with varchar type), I was doing
select max(proposalid) from proposalinfo;
But now I found that once proposalid reaches x6a10, the maximum proposalid I get everytime is x6a9. So, my logic fails. Could anyone tell me how to get the last inserted row so that I can get the last proposalid being inserted.
or would any other logic works better?