zoukankan      html  css  js  c++  java
  • 解决 SQL 不能正确显示中文问题

    use DataBaseName
    go
    if not OBJECT_ID('[Employees]') is Null
       Drop Table [Employees]
    go
    Create Table [Employees]
    (ID int Primary Key Identity(1,1),
     [Name] Nvarchar(50) Not Null,
     [Title] Nvarchar(50) Null,
     [Phone] int Null,
     [City] Nvarchar(20))
     go
     Insert Into [Employees] 
     select '张三', '采购经理', 1234567, '北京'
     Union All
     select '李四', '销售', 7654321, '上海'
     Union All
     select '王小', '前台', 1230000, '上海'
    
     select * from [Employees] where [City] = '上海'
    View Code

    结果显示:

     不改变排序规则和字段类型,加 N 解决:

    use DataBaseName
    go
    if not OBJECT_ID('[Employees]') is Null
       Drop Table [Employees]
    go
    Create Table [Employees]
    (ID int Primary Key Identity(1,1),
     [Name] Nvarchar(50) Not Null,
     [Title] Nvarchar(50) Null,
     [Phone] int Null,
     [City] Nvarchar(20))
     go
     Insert Into [Employees] 
     select N'张三', N'采购经理', 1234567, N'北京'
     Union All
     select N'李四', N'销售', 7654321, N'上海'
     Union All
     select N'王小', N'前台', 1230000, N'上海'
    
     select * from [Employees] where [City] = N'上海'
    View Code

    结果显示:

  • 相关阅读:
    JOIN中的外连接(external join)
    将流数据输出到Mysql中
    updataStateByKey算子的使用
    RDD算子的使用
    sparkstreaming 黑名单过滤
    sparkSQL中的example学习(3)
    sparkSQL中的example学习(1)
    sparkSQL中的example学习(2)
    shuffle调优
    回形取数
  • 原文地址:https://www.cnblogs.com/endless-on/p/3172024.html
Copyright © 2011-2022 走看看