【问题标题】:Please help me out for the following scenario [closed]请帮我解决以下情况[关闭]
【发布时间】:2013-11-07 09:35:10
【问题描述】:

我有一个呼叫中心的数据库。 我的要求是只选择打电话的人(92222、122323、9988898)。

请你帮我写一个查询。

【问题讨论】:

  • select * from table where column_name in (92222, 122323, 9988898)

标签: mysql sql plsql


【解决方案1】:
select all_people from call_centerDB where called_nos=92222 OR called_nos=122323 OR called_nos=9988898

【讨论】:

    【解决方案2】:

    由于您没有向我们提供任何架构详细信息,因此没有太多信息可以继续,但它可能是这样的:

    select      p.person
    from        people p,
                calls c
    where       p.person_id = c.person_id
    and         c.call_target in ('92222', '122323', '9988898')
    

    这将用于以下最小架构:

    people:
        person_id primary key
        person
    calls:
        person_id references people(person_id)
        call_target
    

    根据您的架构有多复杂,您需要的查询可能会完全不同,但这应该是一个很好的起点。

    【讨论】:

      【解决方案3】:

      试试这个

      select * from tbl_call_center where called_no IN (92222, 122323, 9988898)
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-04-21
        • 1970-01-01
        • 2023-03-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多