Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8447103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:06:12+00:00 2026-06-10T10:06:12+00:00

Possible Duplicate: How to insert the next highest number into the database I am

  • 0

Possible Duplicate:
How to insert the next highest number into the database

I am using MYSQL

I have a column known as TeacherId which is auto incremented and goes like this:

TeacherId

1
2
3
4

What I want to do is add the letter ‘T’ in front of the numbers so it becomes:

TeacherId

T1
T2
T3
T4

How can I update or alter table to do this?

Below is my attempt but it did not work:

UPDATE Teacher SET TeacherId = CONCAT('T',TeacherId)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T10:06:14+00:00Added an answer on June 10, 2026 at 10:06 am

    I highly recommend you consider appending the T to the display at query time instead of trying to store a T on every single row. I don’t understand the purpose of storing the data this way, particularly if you have other tables that use the TeacherId value in its native form.

    If you need to distinguish teachers from admins, then two thoughts:

    1. The table should be called Personnel, not Teachers.
    2. This can still be stored as a separate column e.g. PersonnelType.

    I know you might have been told that it should show as T3 etc., but surely they did not tell you explicitly “we want you to store the T and 3 together in the same column, or else.” You can show them T3 without shoehorning them together in a terrible and unusable design.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: insert multiple rows via a php array into mysql I know about
Possible Duplicate: Insert line into a query result (sum) I have a report that
Possible Duplicate: insert contacts into database but does not want to duplicate already existing
Possible Duplicate: insert contacts into database but does not want to duplicate already existing
Possible Duplicate: mySQL - Insert into three tables I want to know if I
Possible Duplicate: Fetch data in database table insert it if not exist else return
Is it possible to INSERT...ON DUPLICATE KEY UPDATE into a table on the current
Possible Duplicate: Insert into array at a specified place How to push 1 or
Possible Duplicate: Resources for Windows Aero Glass and Compositing (DWM) Insert button into window
Possible Duplicate: It is possible to insert data in two different table in mysql

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.