MySQL: How to create a TABLE

Поділитися
Вставка
  • Опубліковано 15 жов 2024

КОМЕНТАРІ • 122

  • @BroCodez
    @BroCodez  2 роки тому +69

    CREATE TABLE employees (
    employee_id int,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    hourly_pay DECIMAL(5, 2),
    hire_date DATE
    );
    SELECT * FROM employees;
    RENAME TABLE employees TO workers;
    DROP TABLE employees;
    ALTER TABLE employees
    ADD phone_number VARCHAR(15);
    ALTER TABLE employees
    RENAME COLUMN phone_number TO email;
    ALTER TABLE employees
    MODIFY COLUMN email VARCHAR(100);
    ALTER TABLE employees
    MODIFY email VARCHAR(100)
    AFTER last_name;
    ALTER TABLE employees
    MODIFY email VARCHAR(100)
    FIRST;
    ALTER TABLE employees
    DROP COLUMN email;

    • @YeahEsCereal
      @YeahEsCereal 2 роки тому +2

      Twelfth comment I was the tenth

    • @matthewmurdock7329
      @matthewmurdock7329 2 роки тому +1

      Yo man 👋 I have a question about your SQL lessons: will there be a complete tutorial for beginners for it like for the other languages?
      Thanks again for all of your work

    • @BroCodez
      @BroCodez  2 роки тому +9

      @@matthewmurdock7329 it depends if people continue watching.

    • @prateeksahu1041
      @prateeksahu1041 Рік тому

      ​@@YeahEsCerealin 😅hindi 2:26 😅😅😮😅😅😅

    • @prateeksahu1041
      @prateeksahu1041 Рік тому

      ​@@matthewmurdock7329in 😅😅

  • @gamerslog4135
    @gamerslog4135 Рік тому +20

    Your teaching methods are to the point, full of information, but can be easily and clearly understood. Thank you so much!

    • @a_asad4646
      @a_asad4646 5 місяців тому

      Assalam o alaikum .
      Kindly guide kryen .
      Ye kis app per bnai ha .
      Mean Kia install Kia then is per work Kia ha.

    • @Name-yu6ux
      @Name-yu6ux 21 день тому

      @@a_asad4646 sql app

  • @wolfdare1953
    @wolfdare1953 2 роки тому +11

    Crazy how you post this the same week as I start with SQL. Thanks a lot.

  • @AayushGupta-fc8bi
    @AayushGupta-fc8bi 8 днів тому +1

    Thank You so much for telling MySQL so easily. I got full marks in practials.

  • @dewaldschuler9736
    @dewaldschuler9736 Рік тому +4

    I completely forgot how to do MySQL, after a year of not taking a subject that utilizes it.
    Now I suddenly have an assignment due by midnight. So I just quickly needed a refresher.
    Thank you for providing a short and to-the-point tutorial.

  • @andredubbs4854
    @andredubbs4854 2 роки тому +8

    hey bro, its so nice seeing you cover sql, an incredibly important language. thanks alot and keep the vids coming!!

  • @Person_Alive
    @Person_Alive Рік тому +4

    I'm gonna recommend this to everyone, your methods are just brilliant it goes to the point and just amazing thanks bro.
    (sorry for bad English still learning)

    • @PastaSempaa
      @PastaSempaa 5 місяців тому +1

      Bro that's perfect, Never apologise for trying to learn a new language, Your doing good buddy

  • @dejasbeautyxoxo1361
    @dejasbeautyxoxo1361 Рік тому +3

    you are out here doing the LORD'S WORK THANK YOU!!!!!!!!

  • @Diyanibeats
    @Diyanibeats 10 місяців тому +1

    I’m self teaching. So I am a beginner and unfamiliar so please be patient with me. When do you use semi colons, asterisk and parenthesis? I know underscore is used for two words. Can you use sql for any software or is sql for a specific program ? What careers use sql? I see this skill listed under duties for data analyst . Thanks for this video very informative

  • @imhungry7692
    @imhungry7692 2 роки тому +35

    stop giving me exactly what I need for tomorrow every time its getting creepy .

  • @alkh2558
    @alkh2558 10 місяців тому +1

    Thank you very much for a very useful hand-on training!

  • @HiraHana20
    @HiraHana20 2 роки тому +1

    FINALLYYYYY, here's a series for SQL. Thanks a lot Bro!

  • @UyenNguyen-m1m
    @UyenNguyen-m1m 10 місяців тому +3

    Please help me with this problem: I type the same thing as BroCode did However, the issue is Error while executing SQL query on database 'sample': near "RENAME": syntax error.

    • @VesaShehu-bj8js
      @VesaShehu-bj8js 9 місяців тому

      Same as me.Did you find a solution til now?

    • @UyenNguyen-m1m
      @UyenNguyen-m1m 9 місяців тому

      @@VesaShehu-bj8js it actually depends on which SQL application u are using. I'm using SQLite so this query will work for me:
      ALTER TABLE table_name RENAME TO new_table_name;

  • @Oizys_Hiraya
    @Oizys_Hiraya 2 місяці тому +1

    can anyone help, it says this error "Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar."

  • @gjbjagadish_185
    @gjbjagadish_185 2 роки тому +2

    bro ur beast in teaching

  • @spacex6997
    @spacex6997 2 роки тому +10

    I did not know that Mr Krabs had a first name.

  • @GldnClaw
    @GldnClaw 7 місяців тому

    For:
    ALTER TABLE employees
    MODIFY COLUMN email VARCHAR(50)
    my ALTER is error-highlighted with the statement ' "ALTER" is not valid at this point, expecting EOF, ';' '
    I've refreshed, checked my version (8.0.36), and generally looked it over, but no luck.

  • @bekiGYD
    @bekiGYD 2 місяці тому

    bro short and clear to understand tanks a lot

  • @jeevanredd
    @jeevanredd 3 місяці тому

    Hi,
    I am getting an error when trying to create a table.
    'Can't find master key from keyring'.

  • @winlox925
    @winlox925 14 днів тому

    iget this error
    Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'COLUMN phone_number to email' at line 2

  • @Realshamsaba
    @Realshamsaba 2 роки тому +2

    reallyyyy happy to see you back again🥺🥺

  • @sunsetytz
    @sunsetytz 5 місяців тому

    Why is my interface different than yours? 😢
    Where did the dark thingy thing comes from

  • @ojeborsuccess9538
    @ojeborsuccess9538 2 місяці тому

    What software did you use in getting this done ols

  • @anuawathare7425
    @anuawathare7425 Рік тому +1

    Hello sir,
    I'm glad that i found your channel to learn SQL. I'm completely new to this subject.
    i came across an error while creating a table column (" hourly pay decimal(5,1)"). could you please clarify?

    • @syedathif3357
      @syedathif3357 11 місяців тому +1

      You need to have an underscore in between when it has two words. So it should be
      "hourly__pay DECIMAL(5,1)"

    • @reannenichellegomes4422
      @reannenichellegomes4422 9 місяців тому

      float can also be used@@syedathif3357

  • @somba-gz4gx
    @somba-gz4gx Рік тому +1

    hey bro code
    i'm trying to tape the same scrito but i get this error:
    ''Error Code: 1046. No database selected Select the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar.''
    how to solve it please

    • @larrissa-wolverine
      @larrissa-wolverine 4 місяці тому

      Double-click on the database to be used on the schemas, for example, he is using mydb, it'd be in bold

  • @ramyaarasavelli159
    @ramyaarasavelli159 Місяць тому +1

    thanks alot🙏

  • @KrAyOnS1
    @KrAyOnS1 Рік тому

    The Modify clause isnt working. It does'nt highlight or anthing like ALTER or SELECT, almost as if mysql is reading it as normal txt. Anyone else has this problem?

  • @kaustubh3334
    @kaustubh3334 2 роки тому +1

    thank you so much bro code I'm your handicap student

  • @lightyagami5604
    @lightyagami5604 2 роки тому +2

    THANKS A LOT KING

  • @Walidfpv
    @Walidfpv 5 місяців тому

    simple and clear, thanks.

  • @SIStefanov
    @SIStefanov 2 роки тому +1

    Bro, you are awesome, bro!

  • @GuillerjamesMantala
    @GuillerjamesMantala 27 днів тому

    Thankyou sensei ❤

  • @srivatsan9163
    @srivatsan9163 7 днів тому

    Hi - I am getting this error in sql workbench app "CREATE TABLE employees (
    employee_id INT,
    first_name VARCHAR(50),
    last_name VARCHAR(50),
    hourly_pay DECIMAL(5, 2),
    hire_date DATE
    ) Error Code: 3185. Can't find master key from keyring, please check in the server log if a keyring is loaded and initialized successfully.".... Someone pelase help!

  • @omparghale
    @omparghale 2 роки тому

    Hey bro, love your videos!!
    Would you consider making NoSQL,GIT/GITHUB,Linux terminal videos in the near future?

  • @amantiger8976
    @amantiger8976 2 дні тому +1

    Watching this before the exam😂

  • @pratikthorat3480
    @pratikthorat3480 Рік тому

    For numbers suppose if this is a real life job scenario, do we still use VARCHAR as a data type or is there any alternative to add larger numbers in a database? Like in Java you can use double or even long so is there something similar?

  • @testingtutorial7886
    @testingtutorial7886 Місяць тому

    you are fantastic.

  • @Bumbble_gaming
    @Bumbble_gaming 27 днів тому

    I not have laptop but still mastered SQL and python with bro

  • @amansinghchoudhary
    @amansinghchoudhary 2 роки тому

    good to see u again

  • @ardrama794
    @ardrama794 4 місяці тому

    great work dear

  • @Shafiifiqh
    @Shafiifiqh 2 роки тому

    Please create a full tutorial on rust

  • @visheshmukherjee
    @visheshmukherjee 2 роки тому

    I’m a regular visitor on this channel hahaha

  • @adeniyiadeyemi5999
    @adeniyiadeyemi5999 10 місяців тому

    Bro you are wonderful 👍

  • @visheshmukherjee9458
    @visheshmukherjee9458 2 роки тому +1

    Thank you!!

  • @mummahadarsal3739
    @mummahadarsal3739 2 роки тому

    bro u are just awesome

  • @lahcenaouina
    @lahcenaouina 2 роки тому

    bro i love u ur amazing

  • @henoktademe1491
    @henoktademe1491 Рік тому

    Just wow❤

  • @igbrowns1151
    @igbrowns1151 2 роки тому

    Love you bro❤️❤️

  • @bluebearh3
    @bluebearh3 2 роки тому +1

    Ty bro

  • @torpedoe1936
    @torpedoe1936 Рік тому

    Legendary !

  • @sourajbasak4492
    @sourajbasak4492 2 роки тому

    sir thr was error in install the key ring pugin plss hlp

  • @xXMaDGaMeR
    @xXMaDGaMeR 2 роки тому

    yes pleaaaase full SQL tutorial

  • @shko_farhad
    @shko_farhad 9 місяців тому

    good

  • @prathaphm7123
    @prathaphm7123 9 місяців тому +1

    HOW to get rid if error Table already exists

  • @JayJecco
    @JayJecco 3 місяці тому

    (Creating a table using SQL) (7marks)
    a. Create a table Customer with four columns as shown below, using SQL statement:
    CUSTOMERS (Id, Name, Age, Adress, Salary)
    b. Add the ProId column as a foreign key to the table Customer
    help me

  • @saadeld9705
    @saadeld9705 7 місяців тому

    thank you bro

  • @raheem81kg
    @raheem81kg 2 роки тому

    SQL, sweet. Maybe react or firebase tutorials in the future.

  • @SplashAni_
    @SplashAni_ 2 роки тому

    thenks bro 🤔

  • @Cloudxxx23
    @Cloudxxx23 2 роки тому

    Why make things complicated using this SQL when companies can use excel and Microsoft access?

  • @Holasoygerman69v2
    @Holasoygerman69v2 Рік тому

    thanks bro

  • @yassinebrono4516
    @yassinebrono4516 2 роки тому +1

    Top top top

  • @aungshinthant5858
    @aungshinthant5858 2 роки тому

    Bro or Sir please upload REACTJS full course

  • @yrn1nja658
    @yrn1nja658 2 роки тому

    yo bro can u teach us php because im strugling with it ❤

  • @sammyay-man2754
    @sammyay-man2754 9 місяців тому

    I got an error 1064. please help me

    • @rzkk33
      @rzkk33 3 місяці тому

      Same. Did u figure it out? It keeps happening with decimals😫

  • @YK_3M
    @YK_3M Рік тому

    Astrix is also known as star.

  • @muhammadshadabahmed8549
    @muhammadshadabahmed8549 2 роки тому +1

    Code king 👑 bro code

  • @thosan3090
    @thosan3090 2 роки тому

    More SQL please sir

  • @programmerdev7251
    @programmerdev7251 2 роки тому

    We want courses in cyber security and ethical hacking

  • @FukSN
    @FukSN 2 роки тому +3

    Broilliant vid as usual.
    Clear and and easy to follow.
    Thanks Bro

  • @tenebrae1191
    @tenebrae1191 Рік тому

    👍👍

  • @miladres
    @miladres 3 місяці тому

  • @AvidAfrican
    @AvidAfrican 2 роки тому

    Bro code!

  • @Goofygoober446
    @Goofygoober446 2 роки тому

    First bro!

  • @begula5036
    @begula5036 2 роки тому +2

    HELLLOOOOOOOIOO

  • @globalweb1973
    @globalweb1973 2 роки тому

    React Js please!

  • @mohaymenul-islam
    @mohaymenul-islam 8 днів тому

    ✅ 8th October - 2024

  • @Gametimewithsurya
    @Gametimewithsurya 3 місяці тому

    BRO IS BRO

  • @alimirzajani-vl7nz
    @alimirzajani-vl7nz 8 місяців тому

    i wish i could shake hands with you

  • @conquester_7
    @conquester_7 2 роки тому

    Second

  • @YeahEsCereal
    @YeahEsCereal 2 роки тому +1

    SQL

  • @sangeetha_1403
    @sangeetha_1403 5 місяців тому

    BroDeed

  • @ShinMugenNoKabe
    @ShinMugenNoKabe 2 роки тому

    #heidisqlgang

  • @Fleizyyyy
    @Fleizyyyy 2 роки тому

    First haha

  • @ElepIn
    @ElepIn 2 роки тому

    #bringbackjavatut lol!

  • @fagitemayowa9238
    @fagitemayowa9238 Рік тому

    Thanks

  • @Bumbble_gaming
    @Bumbble_gaming 27 днів тому

    I not have laptop but still mastered SQL and python with bro

  • @globalweb1973
    @globalweb1973 2 роки тому

    React Js please!