• 常用SQL语句(交互)


    %-------通配符
    select * from [EMoney_Club].[dbo].[GoldIdea_AdviceCollect] where [Content] like '%昵称%'
    select * from [EMoney_Club].[dbo].[GoldIdea_AdviceCollect] where [Content] like '昵称%'----昵称开头
    "_"-------通配符(单独一个字符)
    select * from [EMoney_Club].[dbo].[GoldIdea_AdviceCollect] where [TopicId] like '17_'
    "_"--------代替多个字符
    SELECT * FROM FRIENDS WHERE PHONE LIKE ‘555-6_6_'
     
    SELECT NAME FROM SOFTBALL  
    UNION 
    SELECT NAME FROM FOOTBALL
    ----合并两张表,去重显示
     
    SELECT NAME FROM SOFTBALL
     UNION ALL
    SELECT NAME FROM FOOTBALL

    ---合并两张表,并显示所有

     
    intersect --相交
    SELECT * FROM FOOTBALL
    INTERSECT
    SELECT * FROM SOFTBALL
     
    minus--相减(存在第一张表但不存在第二张表的记录)
    SELECT * FROM FOOTBALL 
    MINUS 
    SELECT * FROM SOFTBALL

    in (between) --从属运算(between 某一个范围内 in在其中一个)
    SELECT * FROM FRIENDS WHERE STATE= 'CA' OR STATE ='CO' OR STATE ='LA'
    SELECT * FROM FRIENDS WHERE STATE IN('CA','CO','LA')
     
    SELECT * FROM PRICE WHERE WHOLESALE BETWEEN 0.25 AND 0.75
  • 相关阅读:
    cocos2d-x 纹理研究
    cocos2d-x 获取图片的某像素点的RGBA颜色
    cocos2d-x Menu、MenuItem
    cocos2d-x ScrollView、TableView
    cocos2d-x RenderTexture
    cocos2d-x NotificationCenter
    cocos2d-x ClippingNode
    cocos2d-x Animation
    JDK,JRE,JVM区别与联系(ZZ)
    SQL中join的用法
  • 原文地址:https://www.cnblogs.com/soloate/p/5590181.html
Copyright © 2020-2023  润新知