MySQL: How to INSERT rows into a TABLE

Sdílet
Vložit
  • čas přidán 10. 10. 2022
  • #mysql
    -- EXAMPLE 1 --
    INSERT INTO employees
    VALUES (1, "Eugene", "Krabs", 25.50, "2023-01-02");
    SELECT * FROM employees;
    -- EXAMPLE 2 --
    INSERT INTO employees
    VALUES (2, "Squidward", "Tentacles", 15.00, "2023-01-03"),
    (3, "Spongebob", "Squarepants", 12.50, "2023-01-04"),
    (4, "Patrick", "Star", 12.50, "2023-01-05"),
    (5, "Sandy", "Cheeks", 17.25, "2023-01-06");
    SELECT * FROM employees;
    -- EXAMPLE 3 --
    INSERT INTO employees (employee_id, first_name, last_name)
    VALUES (6, "Sheldon", "Plankton");
    SELECT * FROM employees;

Komentáře • 45

  • @BroCodez
    @BroCodez  Před rokem +23

    -- EXAMPLE 1 --
    INSERT INTO employees
    VALUES (1, "Eugene", "Krabs", 25.50, "2023-01-02");
    SELECT * FROM employees;
    -- EXAMPLE 2 --
    INSERT INTO employees
    VALUES (2, "Squidward", "Tentacles", 15.00, "2023-01-03"),
    (3, "Spongebob", "Squarepants", 12.50, "2023-01-04"),
    (4, "Patrick", "Star", 12.50, "2023-01-05"),
    (5, "Sandy", "Cheeks", 17.25, "2023-01-06");
    SELECT * FROM employees;
    -- EXAMPLE 3 --
    INSERT INTO employees (employee_id, first_name, last_name)
    VALUES (6, "Sheldon", "Plankton");
    SELECT * FROM employees;

  • @mercenary5463
    @mercenary5463 Před 5 měsíci +11

    Bro called her sandy cheeks and thought we wouldn’t notice 😂

  • @blessing2457
    @blessing2457 Před 8 měsíci +2

    Thank you! This was helpful 👏🏽

  • @j.kelvinfallah
    @j.kelvinfallah Před 3 měsíci

    You killed it bro. Thanks

  • @ayskvv
    @ayskvv Před 11 měsíci +4

    bro has helped me more than my teachers ever could :skull:

  • @Kabila.Shabab-ok9fl
    @Kabila.Shabab-ok9fl Před 3 měsíci +1

    Bro you made me cry, you're too good to make such a thought thing into an easy thing. LoL bro Lol

  • @murodjonsadullaev1727
    @murodjonsadullaev1727 Před rokem +10

    thank you bro for sharing with such precious knowledges. God bless you man

  • @dinushachathuranga7657
    @dinushachathuranga7657 Před 10 měsíci

    Thanks for the video❤

  • @ugyenofficial
    @ugyenofficial Před rokem

    Thank you so much Bro❤❤

  • @bichoron3603
    @bichoron3603 Před 27 dny

    Amazing work Bro. Please keep it up & give us more tutorials about SQL learning & practical projects. Waiting for your replay

  • @younessj4923
    @younessj4923 Před rokem

    Thank you so much Broo

  • @user-wt4bb8fw5z
    @user-wt4bb8fw5z Před 2 měsíci

    Bro is a goat in this field, keep it up
    🇿🇼🇿🇼🇿🇼

  • @user-je1wn9um3i
    @user-je1wn9um3i Před 7 měsíci

    you are the best thank you so much

  • @kunalchauhan5294
    @kunalchauhan5294 Před rokem +11

    1 comment Felling lucky with every other bro

  • @andredubbs4854
    @andredubbs4854 Před rokem

    cool video bro!

  • @lofwyr5063
    @lofwyr5063 Před 5 měsíci

    Is the fact that you are getting column names on the empty set a feature of the sql workbench? Cause all I get, on an empty set, is "empty set".
    I'd have to use "show columns" for that.

  • @Person_Alive
    @Person_Alive Před 9 měsíci

    Why and how, only 31 comments bro you deserve a lot more

  • @mdomine245
    @mdomine245 Před 8 měsíci

    is there commit or rollback command like oracle?

  • @adedamolayusuf7018
    @adedamolayusuf7018 Před rokem +1

    trying to learn python although, your videos help a lot, I get bored after some time of learning like I need the thing I know to use for real-life problems what can I do

  • @short-shots
    @short-shots Před rokem

    BRO CHAD GANG GANG BOOM

  • @luly6465
    @luly6465 Před 5 měsíci

    How can I delete a duplicate row?
    When I follow the query example and it says: values ( and write I write the information of the employee) and then I run the query and check the table the row repeats🧐

  • @kennethfortugaleza5073
    @kennethfortugaleza5073 Před měsícem

    My man how do I add an image to a table? and if so anyway to view it?

  • @tboleon
    @tboleon Před rokem +3

    question, whats mysql and what is its purpose?

    • @BroCodez
      @BroCodez  Před rokem +3

      It's a language to query a database

  • @gamePlays9699
    @gamePlays9699 Před rokem +1

    Eugene?

  • @KrAyOnS1
    @KrAyOnS1 Před rokem

    Question. You set the hourly pay to DECIMAL. What if it was a whole number woulf it matter?

  • @ReeshavGhosh200
    @ReeshavGhosh200 Před rokem

    How to make ai for games in html using javascript

  • @essammakia3475
    @essammakia3475 Před rokem +1

    im getting this error
    17:57:10 INSERT INTO employees VALUES (1, "Eugene", "Krabs", 25, "2023-01-02") Error Code: 1136. Column count doesn't match value count at row 1 0.000 sec
    hope you can help me !

    • @brandonh9142
      @brandonh9142 Před rokem +1

      my problem was i left the email section in check to make sure you have the correct amount of columns use code:
      alter table employees
      drop column email;
      to remove a column.
      then add the code again should work.

    • @essammakia3475
      @essammakia3475 Před rokem

      @@brandonh9142 thanks 🙏 I will give it a try

    • @KrAyOnS1
      @KrAyOnS1 Před rokem

      @@essammakia3475 Did it work? Having same issue

    • @essammakia3475
      @essammakia3475 Před rokem

      @@KrAyOnS1 no it did not work for me sadly

  • @M4LAZE
    @M4LAZE Před rokem

    how to remove dupicate rows

  • @mulumbacephas5036
    @mulumbacephas5036 Před rokem

    A random comment to hack youtube algorithm

  • @sherzod7788
    @sherzod7788 Před 10 měsíci +2

    hey bro code. at 5:09 can we just insert null values instead of telling mysql which columns we will insert?

    • @markocoly4960
      @markocoly4960 Před 2 měsíci

      hey did you find the solution i have the same problem

  • @GaBeKool
    @GaBeKool Před rokem

    Something doesnt work for me. When i try to print the table (SELECT * FROM employees) my whole program crashes. Whats wrong there? Am i the only one having this issue?

  • @fyrukmcoo100
    @fyrukmcoo100 Před rokem

    :((

  • @ronf6900
    @ronf6900 Před rokem +2

    NO GO TUTORIAL @brocode WTF