Master SQL UPDATE Statement | SQL UPDATE A-Z Tutorial | SQL Update with JOIN

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ม.ค. 2025

ความคิดเห็น • 45

  • @milindzuge906
    @milindzuge906 2 ปีที่แล้ว +1

    Crystal clear Ankit, love it❣

  • @Raj-ph1py
    @Raj-ph1py 2 ปีที่แล้ว +3

    This was so clear and precise and easy to understand. Thank you!!!

  • @naveenbhandari5097
    @naveenbhandari5097 11 หลายเดือนก่อน

    really helpful playlist bhai, kudos to you!!! keep doing great!

  • @ladiashrith5230
    @ladiashrith5230 ปีที่แล้ว

    00:04 SQL Update Statement
    02:14 Update salary of employee 1 to 12,000
    04:23 Updating multiple values in a column
    06:46 Update statement with case when statement allows for conditional updates.
    09:06 Add department name column to employee table and update it with values from department table
    11:25 Update department names for employees using join and update gender values with conditions
    14:34 Updating queries with case statement
    16:54 Before running an update statement, convert it into a select statement to check the values being updated and the number of rows being affected.

  • @maheshbhadane1520
    @maheshbhadane1520 2 ปีที่แล้ว

    Thanks for making such informative videos It's very clear for understanding Thanks once again... please make more videos

  • @sahilummat8555
    @sahilummat8555 3 หลายเดือนก่อน

    Beautiful Explanation sir, loved it :)

  • @kanchankumar3355
    @kanchankumar3355 2 ปีที่แล้ว

    Very helpful, I had doubts but now I am confident with update.

  • @sakshinaik05
    @sakshinaik05 2 ปีที่แล้ว +1

    You have covered all the scenarios thank you for this video

  • @radhikakushwah273
    @radhikakushwah273 8 หลายเดือนก่อน

    congrates ankit sir on 100K

  • @kadamteja5743
    @kadamteja5743 2 ปีที่แล้ว

    Thanks for the video, this is very useful for interviews.

  • @shwetalendi8904
    @shwetalendi8904 ปีที่แล้ว +1

    You are just amazing

  • @BengaluruGuy08
    @BengaluruGuy08 2 ปีที่แล้ว

    Great video...Thanks

  • @SidIndian082
    @SidIndian082 ปีที่แล้ว

    Sir 16:34 : Emp_ID 3 / 4 : display as female for Vikas & Rohit .. How is this Data valid ???

  • @shivajain8255
    @shivajain8255 2 ปีที่แล้ว

    Can you recommend courses or websites to practice advance excel for the analyst interview

  • @ArunaSriGarimella
    @ArunaSriGarimella ปีที่แล้ว

    Could you please add create and insert statements for those tables?!

  • @pratibhamishra869
    @pratibhamishra869 2 ปีที่แล้ว

    Good work

  • @shakti_jais
    @shakti_jais 8 วันที่ผ่านมา

    create table dept(
    dep_id int,
    dep_name varchar(20));
    insert into dept
    values(100 , 'Analyst'), (200, 'IT'),(300, 'HR'),(400 , 'Text Analytics')

  • @priyankakadam9418
    @priyankakadam9418 2 ปีที่แล้ว

    Hi Ankit really helpful video its very useful to understand update statement in depth , it would be really great help if u could make video simmillar to this for INSERT as well with diff use cases. thanks

  • @musiccanfirst5697
    @musiccanfirst5697 ปีที่แล้ว +1

    Which DBMS is a good SQL Server or MySQL every time I practise new errors come.

  • @themightyvk
    @themightyvk ปีที่แล้ว

    Thanks Ankit..

  • @shanthankasula5503
    @shanthankasula5503 3 หลายเดือนก่อน

    Ankit bhai.....agar aap ...emp table data provide kiya tho bahut help hoga...
    Hum b side by side ..parallely practice kar sakte

    • @ankitbansal6
      @ankitbansal6  3 หลายเดือนก่อน

      2 min lagta hai banane m. Thoda try Karo practice bhi ho jaayega ..

    • @shanthankasula5503
      @shanthankasula5503 3 หลายเดือนก่อน

      @@ankitbansal6 thank you bhai...koi comments mai dala hua h table

  • @r_s7927
    @r_s7927 ปีที่แล้ว

    where can we get this datasets or tables from ??

  • @BNM110
    @BNM110 2 ปีที่แล้ว

    Thank you

  • @lokeshtaneja2107
    @lokeshtaneja2107 2 ปีที่แล้ว

    UPDATE WITH INNER JOIN clause is not working in MY SQL Workbench.which software should i download?

  • @Partha-w1k
    @Partha-w1k 24 วันที่ผ่านมา

    6.).Update interview questions
    1- Update basic syntax
    2- Update with where clause
    3- Update multiple values in a statement
    4- Update with constant values and derivations
    5- Update using Join
    7- Interview question on Update
    8- Some tips and tricks on sql update
    1 - update emp set salary=12000
    2- update emp set salary=12000 where emp_age>30
    3- update emp set salary=12000 , dep_id=200 where emp_id=2
    4-update emp set salary = case when dep_id=100 then salary * 1.1 when dep_id=200 then salary*1.2 else salary end
    5- first add dept name in the emp table
    Update emp set dep_name=d.dep_name
    From emp e
    Inner join dept d on e.dep_id=d.dep_id
    7- update emp set gender = case when gender =‘Male’ then ‘Female’ else ‘Male’ end
    8- a) select *, case when gender=‘Male’ then ‘Female’ else ‘Male’ end from emp
    b) select *, case when gender=‘Male’ then ‘Female’ else ‘Male’ end from emp where dep_id=200

  • @sanskarram992
    @sanskarram992 11 วันที่ผ่านมา

    create table emp(
    emp_id int,
    emp_name varchar(20),
    department_id int,
    salary int,
    manager_id int,
    emp_age int);
    insert into emp
    values (1, 'Ankit', 100,10000, 4, 39),
    (2, 'Mohit', 100, 15000, 5, 48),
    (3, 'Vikas', 100, 10000,4,37),
    (4, 'Rohit', 100, 5000, 2, 16),
    (5, 'Mudit', 200, 12000, 6,55),
    (6, 'Agam', 200, 12000,2, 14),
    (7, 'Sanjay', 200, 9000, 2,13),
    (8, 'Ashish', 200,5000,2,12),
    (9, 'Mukesh',300,6000,6,51),
    (10, 'Rakesh',300,7000,6,50),
    (11, 'Akhil',500,3000,1,31);

  • @lokeshtaneja2107
    @lokeshtaneja2107 2 ปีที่แล้ว

    I have tried this UPDATE WITH INNER JOIN clause in MY SQL Workbench it's not working. please share why it always shows error.

    • @ankitbansal6
      @ankitbansal6  2 ปีที่แล้ว

      Use SQL server

    • @lokeshtaneja2107
      @lokeshtaneja2107 2 ปีที่แล้ว

      @@ankitbansal6 Sir,please share the link from where I can download SQL SERVER.

    • @ankitbansal6
      @ankitbansal6  2 ปีที่แล้ว

      www.microsoft.com/en-us/evalcenter/evaluate-sql-server-2019

    • @sanskarram992
      @sanskarram992 11 วันที่ผ่านมา

      the syntax will be different in mysql
      update emp e inner join dept d on e.department_id = d.dep_id set e.dept_name = d.dep_name;

  • @VikashKumar0409
    @VikashKumar0409 2 หลายเดือนก่อน

    create table emp(
    emp_id int,
    emp_name varchar(20),
    department_id int,
    salary int,
    manager_id int,
    emp_age int);
    insert into emp
    values (1, 'Ankit', 100,10000, 4, 39);
    insert into emp
    values (2, 'Mohit', 100, 15000, 5, 48);
    insert into emp
    values (3, 'Vikas', 100, 10000,4,37);
    insert into emp
    values (4, 'Rohit', 100, 5000, 2, 16);
    insert into emp
    values (5, 'Mudit', 200, 12000, 6,55);
    insert into emp
    values (6, 'Agam', 200, 12000,2, 14);
    insert into emp
    values (7, 'Sanjay', 200, 9000, 2,13);
    insert into emp
    values (8, 'Ashish', 200,5000,2,12);
    insert into emp
    values (9, 'Mukesh',300,6000,6,51);
    insert into emp
    values (10, 'Rakesh',300,7000,6,50);
    insert into emp
    values (11, 'Akhil',500,3000,1,31);