Hi everyone,

I am pretty new to SQL and I would like to know how can I add a prefix or postfix to all records in one field. Example: I want to add "PK-" before all barcodes in my database.

Recommended Answers

All 2 Replies

update test set barcode = CONCAT('PK_',barcode,'_ZZ');

Very simple! Thank you very much!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.