Prakash Mondal

Prakash Mondal

  • NA
  • 288
  • 210k

How to Update Multiple table records using table alias???

Apr 6 2013 11:40 PM
I create two table..

create table stupersonal (stuid varchar(20) primary key,stuaddress varchar(20),stufname varchar(20));

create table stuclass (stuid varchar(20) primary key,stuclass varchar(20),stusec varchar(20));



also insert some values...............

but, I update some value to both table.

I write...................using table alias in SQL SERVER-2005

update stupersonal sp, stuclass sc set sp.stuaddress='Kolkata',sp.stufname='Smith',sc.stuclass='X', sc.stusec='A' where sp.stuid='amit123' and sc.stuid='amit123';


but. error.......................
can't update this value to those tables.................

Please  solve this problem..............

.............................Prakash



Answers (1)