如何在数据库中插入印度卢比符号(Oracle 10g,MySql 5.0和Sql Server 2008)? [英] How to insert Indian Rupees Symbol in Database (Oracle 10g, MySql 5.0 and Sql Server 2008)?
问题描述
如何在数据库中插入印度卢比符号(Oracle 10g,MySql 5.0和Sql Server 2008)?
How to insert Indian Rupees Symbol in Database (Oracle 10g, MySql 5.0 and Sql Server 2008)?
实际上我有一个表货币字段像currencyName和currencysymbol,因此我将如何在数据库中插入新的卢比符号。
Actually i had one Table "Currency" , in which 2 field is like "currencyName" and "currencysymbol", so how would i insert new rupees symbol in databse.
推荐答案
大约₹
(U + 20B9 New Rupee符号),除了那么新,几乎没有字体支持。如果您有支持Unicode的数据库连接,您可以像任何其他字符一样轻松地存储它:
There's nothing special about ₹
(U+20B9 New Rupee symbol), except that, being so new, there is almost zero font support for it. If you've got a database connection that supports Unicode, you can store it just as easily as any other character:
INSERT INTO Currency (name, symbol) VALUES ('INR', '₹');
(您要使用NVARCHAR作为存储空间, N'₹' / code>在SQL Server。)
(You would want to use NVARCHAR for storage and N'₹'
in SQL Server.)
如果你没有一个Unicode安全的连接(例如你使用一些crap工具,控制台),你必须使用例如
If you haven't got a Unicode-safe connection (for example you're using some crap tool like the Windows console) you would have to work around that using eg.
VALUES ('INR', CHAR(226, 130, 185))
用于MySQL中的UTF-8分页列,或 NCHAR 8377)
用于SQL Server中的Unicode列。
for a UTF-8-collated column in MySQL, or NCHAR(8377)
for a Unicode column in SQL Server.
这篇关于如何在数据库中插入印度卢比符号(Oracle 10g,MySql 5.0和Sql Server 2008)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!