如何在SQL语句中使用原始的Guid而不是little endian? [英] How to use the original Guid in the SQL statement instead of the little endian one?
本文介绍了如何在SQL语句中使用原始的Guid而不是little endian?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道我们可以
INSERT INTO "Table1" VALUES(X'57A00F3015310D4081AD4ADEF3EBDB5E');
但是这种小端序格式很难与原始Guid进行比较
But this little endian format is difficult to compare to the original Guid
300FA057-3115-400D-81AD-4ADEF3EBDB5E
如何在SQL语句中使用原始Guid而不是小端字节序?
How to use the original Guid in the SQL statement instead of the little endian one?
推荐答案
如果您想轻松地与原始内容进行比较而不进行转换,则将其存储为文本.这样会占用更多的存储空间,并且读/写/比较会比较慢,但是可读性更高.
If you want to easily compare to the original without converting then store it as text. It'll take more storage space and will be slower to read/write/compare, but it'll be more human readable.
这篇关于如何在SQL语句中使用原始的Guid而不是little endian?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文