SQL插入語句中有單引號 && SQL中char nchar varchar nvarchar的區別 && Java中字元(串)和數值型別的轉換

willproud發表於2013-04-19

A:sql 插入語句中有單引號 怎麼辦?

Q:字串中的單引號,一律用兩個單引號表示就行了。


A:SQL中char nchar varchar nvarchar的區別是什麼?

Q:http://stackoverflow.com/questions/176514/what-is-the-difference-between-char-nchar-varchar-and-nvarchar-in-sql-server

  • nchar and nvarchar can store Unicode characters.
  • char and varchar cannot store Unicode characters.
  • char and nchar are fixed-length which will reserve storage space for number of characters you specify even if you don't use up all that space.
  • varchar and nvarchar are variable-length which will only use up spaces for the characters you store. It will not reserve storage like char or nchar.
  • nchar and nvarchar will take up twice as much storage space, so it may be wise to use them only if you need Unicode support.

A:Java中字元(串)和數值型別的轉換

Q:http://dongdong1314.blog.51cto.com/389953/79385

相關文章