Create Auto_Increment on PostgreSQL

Ok sometimes we need function auto_increment from MySQL and we need same function on PostgreSQL. And now I will try to make a similiar function as auto_increment in PostgreSQL, and tutor I get from this site Thanks to StackOverflow.πŸ˜€
And then use this sql query to make auto_increment on PostgreSQL:

CREATE SEQUENCE auto_increment;

So to use this function when we create table, see this query:

CREATE table test (
no_induk INT NOT NULL DEFAULT NEXTVAL('auto_increment')

And now we have made function as auto_increment from MySQL. Simple and easy..πŸ™‚


  1. I’ve been exploring for a bit for any high-quality articles or weblog posts in this kind of area . Exploring in Yahoo I at last stumbled upon this web site. Studying this info So i’m satisfied to convey that I have a very excellent uncanny feeling I discovered exactly what I needed. I so much without a doubt will make sure to do not disregard this web site and provides it a glance regularly.

  2. I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on few general things, The website style is wonderful, the articles is really excellent : D. Good job, cheers

  3. Hi! Quick question that’s entirely off topic. Do you know how to make your site mobile friendly? My weblog looks weird when viewing from my iphone. I’m trying to find a theme or plugin that might be able to fix this issue. If you have any suggestions, please share. Cheers!

  4. I was curious if you ever thought of changing the layout of your site? Its very well written; I love what youve got to say. But maybe you could a little more in the way of content so people could connect with it better. Youve got an awful lot of text for only having one or 2 images. Maybe you could space it out better?

  5. An interesting discussion is definitely worth comment. I think that you ought to publish more on this subject, it might not be a taboo matter but typically people do not discuss such issues. To the next! Cheers!!

  6. Hi there, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot
    of spam comments? If so how do you reduce it, any plugin or anything
    you can advise? I get so much lately it’s driving me mad so any help
    is very much appreciated.

  7. Unquestionably imagine that that you stated. Your favorite reason appeared to be on the web the easiest factor to bear in mind of.
    I say to you, I certainly get annoyed while people think about worries that
    they plainly don’t understand about. You controlled to hit the nail upon the
    highest and also defined out the whole thing with no need side-effects , other folks can take a signal.
    Will likely be again to get more. Thanks

  8. My brother recommended I would possibly like this blog.
    He was once entirely right. This submit truly made my day.

    You can not believe simply how so much time I had spent for
    this information! Thank you!

  9. I’m no longer sure where you are getting your info, but great topic.
    I must spend some time learning much more or understanding
    more. Thank you for excellent info I used to be on the lookout for this info for my mission.

  10. Have you ever thought about publishing an ebook or guest authoring on other blogs?
    I have a blog based on the same ideas you discuss and would really like to
    have you share some stories/information. I know
    my audience would enjoy your work. If you are even remotely interested, feel free to send me an e mail.

  11. When someone writes an piece of writing he/she maintains the idea of a user in his/her mind that
    how a user can be aware of it. So that’s why this post is great.

  12. Thank you for some other informative blog. The place else could I am getting that type of info written in such an ideal method?

    I’ve a undertaking that I am simply now running on, and I have been at
    the glance out for such info.

  13. Howdy very nice website!! Mann .. Beautiful ..
    Wonderful .. I wil bookmark your blog and take the feeds also?

    I am happy to search out numerous helpful information here within the submit, we want work out extra strategies in this regard, thank youu for
    sharing. . . . . .

  14. hi!,I love your writing so a lot! share we keep up a correspondejce
    more approximately yolur post on AOL? I require an expert in this
    space to solve my problem. Maybe that is you! Taking a look forward to look you.

  15. I was wondering iff you ever considered changing
    the structure of your site? Its very welkl written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could connect with
    it better.Youve got ann awful lot of text for only having 1 or 2 pictures.
    Maybe you cold space it out better?

  16. I will immediately grab your rss as I can’t find your email subscription hyperlink or newsletter service.
    Do you have any? Please permit me understand so that I may subscribe.

  17. An outstanding share! I’ve just forwarded this onto a co-worker whho had
    been conducting a little homework on this. And he in fact bojght me dinner because I
    found it for him… lol. So alllow me to reword this….
    Thsnks for tthe meal!! But yeah, thanks for spending some time to discuss this issue here on your
    intrrnet site.

  18. Oh my goodness! Awesome article dude! Thanks, However I aam
    experiencing problems with your RSS. I don’t understand the reason whhy I cannot subscribe to it.

    Is there anybody else having similar RSS problems? Anyone that knows
    the answer can you kindly respond? Thanx!!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s