如何在MySQL中存储varbinary?
只是一个简单的问题 在下面提到的两个选项中,如何在MySQL中存储到如何在MySQL中存储varbinary?,mysql,types,varbinary,Mysql,Types,Varbinary,只是一个简单的问题 在下面提到的两个选项中,如何在MySQL中存储到varbinary列 public_key = '67498930589635764678356756719' 或 第二种方法有效吗?我在生产服务器上工作时遇到了紧急情况,不想在上面做实验 感谢您的帮助。可以使用引号插入可打印数据。可以使用十六进制值插入不可打印的数据。即: INSERT INTO Table(VarBinaryColumn) VALUES('Printable data') -- Will be stored
varbinary
列
public_key = '67498930589635764678356756719'
或
第二种方法有效吗?我在生产服务器上工作时遇到了紧急情况,不想在上面做实验
感谢您的帮助。可以使用引号插入可打印数据。可以使用十六进制值插入不可打印的数据。即:
INSERT INTO Table(VarBinaryColumn) VALUES('Printable data') -- Will be stored as binary representation using the charset of the operating system
INSERT INTO Table(VarBinaryColumn) VALUES(0x12345) -- Non-printable binary data
INSERT INTO Table(VarBinaryColumn) VALUES('Printable data') -- Will be stored as binary representation using the charset of the operating system
INSERT INTO Table(VarBinaryColumn) VALUES(0x12345) -- Non-printable binary data