This requirement is a table structure that itself is designed to
But now you need to save the data in the 17, 18, 193 fields in the BLOB as a number in a new three field outside the Blob Gem1 Gem2 Gem3.
You can do this by using the following SQL statement:
1, add three fields:
Copy Code code as follows:
ALTER TABLE Equipmentinfo add Gem1 TINYINT UNSIGNED default 0;
ALTER TABLE Equipmentinfo add Gem2 TINYINT UNSIGNED default 0;
ALTER TABLE Equipmentinfo add Gem3 TINYINT UNSIGNED default 0;
2, use the following command to copy the data in the BLOB
Update Equipmentinfo Set Gem1=conv (substr (HEX (Equipmentblob), 17,2), 16,10), Gem2=conv (substr (HEX), 19,2), 16,10), Gem3=conv (substr (HEX (Equipmentblob), 21,2), 16,10);
Description
HEX (Equipmentblob) converts equipmentblob to a 16-in-system string
SUBSTR (Str,beginidx,num) intercepts the string of STR from the BEGINIDX and intercepts the length of num
Conv (n,from_base,to_base) N is the data to be converted, From_base is the original, and the To_base is the target system.