MySQL: AUTO_INCREMENT is awesome

Поделиться
HTML-код
  • Опубликовано: 24 окт 2022
  • #MySQL #tutorial #course
    - AUTO_INCREMENT keyword used to automatically create a sequence of a column when inserting data. Applied to a column set as a ‘key’.
    CREATE TABLE transactions (
    transaction_id INT PRIMARY KEY AUTO_INCREMENT,
    amount DECIMAL(5, 2)
    );
    ALTER TABLE transactions
    AUTO_INCREMENT = 1000;

Комментарии • 29

  • @BroCodez
    @BroCodez  Год назад +12

    - AUTO_INCREMENT keyword used to automatically create a sequence of a column when inserting data. Applied to a column set as a ‘key’.
    CREATE TABLE transactions (
    transaction_id INT PRIMARY KEY AUTO_INCREMENT,
    amount DECIMAL(5, 2)
    );
    ALTER TABLE transactions
    AUTO_INCREMENT = 1000;

  • @nikhil14rathi
    @nikhil14rathi Год назад +4

    Thanks a lot dude. I was literally struggling in implementing this feature, searched for every possible solution but couldn't find it but then your video came into place and my whole problem was solved.
    Keep posting such informative videos.

  • @justinbanzamizibu3685
    @justinbanzamizibu3685 Год назад

    It is a great new to see that you have started with databases,
    I am going to enjoy mastering Mysql.
    thank you bro!

  • @milad12321
    @milad12321 Год назад

    Thank you for the sql series. Very nice one!!

  • @sandylove7534
    @sandylove7534 Год назад

    Thanks so much sir
    Very useful

  • @log8746
    @log8746 11 месяцев назад

    Thanks man you're the best!

  • @gayathric256
    @gayathric256 Год назад

    Man you are awsome!❤️🥺✔️

  • @__joshplays.
    @__joshplays. Год назад

    Thank you so much!! It is really helpful, the one i struggled with is what to do with the values since it is auto incrementing, do i have to input a value to each? And also i have learned additional of the Alter Table
    auto_increment=number_startID if you want something starting number at

  • @sumanlodhi7541
    @sumanlodhi7541 9 месяцев назад

    Thank you so much 😊

  • @aqilrahaman5478
    @aqilrahaman5478 Месяц назад

    can you do auto increment exactly the same as this one but with a prefixes at the front?

  • @xudayfitechoffiaicl5125
    @xudayfitechoffiaicl5125 Год назад +4

    Teach bro code, I learn java for your course, i finished 41 leasons , that made me to creat a scientific calculator can you jake please. THANKS FOR UR HELP SIR

  • @user-fm4se4tn8x
    @user-fm4se4tn8x Год назад +2

    Is it possible to add it to an already completed table?

  • @bachduy3807
    @bachduy3807 5 месяцев назад

    I have a question: I have created the user table and connected the database normally, but I have a problem with the register in my project and cannot insert it into the database. Now I go back to the database and adjust the auto-increment id. Does it affect the system? Thank you

  • @BintangBrilian
    @BintangBrilian Год назад +2

    and what if we have id 1,2,3,4,5 then remove id to 3,4 and after adding data it leads to id 6,7

  • @ameerysf
    @ameerysf 9 месяцев назад

    how about an alphanumerical auto increment? can you help tho

  • @WhoBeSilly
    @WhoBeSilly 6 месяцев назад

    I toggled Auto Increment on in MySQL Workbench instead of hand-coding, and for some reason the PK (word_id) isn't auto-incrementing. Any ideas of why this is?

  • @sureshsuresh-xk5bi
    @sureshsuresh-xk5bi 6 месяцев назад

    Hi sir
    I want to add auto_increment in two columns, is it possible

  • @ceejayviii
    @ceejayviii Месяц назад

    How to do in cached sqlite database app.db?

  • @almenshandy
    @almenshandy Год назад

    what if you delete the data? and the id not sorted correctly? Can anyone resolve this?

  • @vbbeats995
    @vbbeats995 4 месяца назад

    How to drop primary key from table???

  • @Mr.Arshad-oc1fd
    @Mr.Arshad-oc1fd 12 дней назад

    In SQL aut increment not running

  • @shaikh.quadeer
    @shaikh.quadeer Год назад +1

    please bring Git course

    • @KarolKasperek
      @KarolKasperek Год назад +1

      YES, there is no good tutorial on the entire internet about git and gitHub. it's so fucked and wird

  • @lenardtom7966
    @lenardtom7966 8 месяцев назад

    hello, i have to make it alphanumeric but still auto increment.
    for example:
    AB-1-0001 then if it reach AB-1-9999, then it will become AB-2-0000
    i hope somebody can help me out with this. thanks in advance

  • @zorenromera
    @zorenromera Год назад

    php please ☺️

  • @OliviaChen0806
    @OliviaChen0806 Год назад +1

    Yeah first again. 🎉 but where is the game bro 🥹

    • @BroCodez
      @BroCodez  Год назад

      which game are you referring to? 🤔

    • @OliviaChen0806
      @OliviaChen0806 Год назад

      @@BroCodez Actually I am not very good at games😂 but I’ve watched quarter final LoL worlds 2022. That has been amazing.😱This series made me scream so much🤭