首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    前端也该知道,除了 select 、 from 、 where 之外的另外几个重要的数据库操作

    customer_id order_date 1 1 2020-01-01 2 2 2020-02-01 3 1 2020-03-01 然后,我们可以使用 JOIN 操作将这两个表连接在一起: SELECT...customers.name, orders.order_date FROM customers JOIN orders ON customers.customer_id = orders.customer_id...; 这个查询的结果如下: name order_date Alice 2020-01-01 Alice 2020-03-01 Bob 2020-02-01 从上面的结果可以看到,这张合成表包含了客户的名称和对应的订单日期...AND 运算符来查找满足两个条件的记录, 延续之前的例子:例如查找订单日期在 2020 年 1 月 1 日之后,且客户名称为“张三”的记录: SELECT customers.name, orders.order_date...2、使用 OR 运算符来查找满足任意一个条件的记录, 例如查找订单日期在 2020 年 1 月 1 日之后,或客户名称为“张三”的记录: SELECT customers.name, orders.order_date

    59820
    领券