Number seq generate in SQL
select
newcode+step
from
(select max(code) as newcode from cpncode) c,
(select count(*) as step
from cpncode a, cpncode b
where
a.code <= b.code
group by a.code limit 5) d;
Written by xt84
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#