Adsense
Popular Posts
- jQuery autocomplete scroll bar for dropdown menu
- mod_auth_cas.so error: undefined symbol: SSL_connect
- JavaScript Arrays and Associate Arrays
- Design date and signature box in Latex
- JavaScript, remove trailing insignificant zeros after toFixed function
- Install APXS in Redhat Linux
- jQuery, toggle the display
- Difference between state and props in React
- super(props) in React
- MySQL workbench -"Could not decrypt password cache"
Monday, July 14, 2014
Get first 4 strings of the field in MySQL
I have a MySQL table fmcontract_sims_courses, and I only want to select the first 4 strings of the field
CourseDescription_original:
SELECT SUBSTRING(CourseDescription_original, 1, 4) FROM fmcontract_sims_courses
Copy this value to the column Section in table fmcontract_course_assignment:
UPDATE fmcontract_course_assignment as a, fmcontract_sims_courses as b SET a.Section =
SUBSTRING(b.CourseDescription_original, 1, 4) WHERE a.CRSEID = b.CourseKey
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment