Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 MySQL

Author  Topic 

mjlicklid
Starting Member

1 Post

Posted - 2010-12-16 : 15:28:01
Can anyone give me the correct expression?

update jos_employee set ext = (select concat('1', ext) from jos_employee)

I don't know SQL very well..

Thanks,

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-12-16 : 15:33:23
You should post your MySQL question on a site that specializes in MySQL. SQLTeam is for Microsoft SQL Server and not MySQL. You could try mysql.com or dbforums.com, which has a MySQL forum.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

kadolkre
Starting Member

2 Posts

Posted - 2010-12-17 : 01:20:01
update jos_employee
set ext=(select concat(1,'ext')from jos_employeee);

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2010-12-20 : 08:22:57
It is becuase the subquery is returning more than a row. You need to use

update jos_employee set ext = concat('1', ext)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -