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
Loading
Manoranjan GuptaPosted Apr 8, 2013, 1:45 AM
Please go step by step :
1>create table tblmanuemployee(ID int, name varchar(10), salary int )
2>create table job(ID int, title varchar(10), averageSalary int)
insert data in both table using simple query
>UPDATE tblmanuemployee SET Salary = 4000 FROM Employee INNER JOIN Job ON Employee.ID = Job.ID
it will work fine
after that fire select query