auto_increment is for integer, I want to add a character at the front
of that number. Ex:
create table abs (UserID INT(3) NOT NULL AUTO_INCREMENT, name varchar(15),
primary key(UserID));insert into abs(name) VALUES ('Elton'), ('Andy'), ('Peter');
select * from abs;
The output is:
+ -------+--------+
| UserID | name |
+--------+--------+
| 1 | Elton |
| 2 | Andy |
| 3 | Peter |
+ -------+--------+
The output I want is:
+ -------+--------+
| UserID | name |
+--------+--------+
| U1 | Elton |
| U2 | Andy |
| U3 | Peter |
+ -------+--------+
Notice that I added 'U' at the front of the UserID, is it possible to
do that?
What is the command for that? Thanks
Best Regards,
Hau Jyn