By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,971 Members | 907 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,971 IT Pros & Developers. It's quick & easy.

update [table] select - but I only need part of the column field value to select

P: n/a
Expand|Select|Wrap|Line Numbers
  1. UPDATE redesign.student SET student_work_area_other  SELECT
  2. REPLACE('anywhere,(.*)', '$1', i.work_area) AS regexp_col  FROM
  3. mycompany.interns i,  redesign.student s  WHERE i.unique_key =
  4. s.unique_key  GROUP BY work_area
Of course this does not work, but I have no idea what the MySQL
equivalent will be to something like this.

I basically want to take out PART of a column field value and update it
into another database table. How is that done?


Jan 26 '06 #1
Share this Question
Share on Google+
1 Reply

P: n/a

you can include subqueries that have this form:

UPDATE table_name SET field_name = (SELECT one_field FROM another_table)
WHERE any_condition

Jan 26 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.