View's SELECT contains a subquery in the FROM clause

后端 未结 4 928
走了就别回头了
走了就别回头了 2020-11-28 08:41

I have two tables and I need to create a view. The tables are:

credit_orders(id, client_id, number_of_credits, payment_status)
credit_usage(id, client_id, cr         


        
4条回答
  •  青春惊慌失措
    2020-11-28 09:30

    As per documentation:

    MySQL Docs

    • The SELECT statement cannot contain a subquery in the FROM clause.

    Your workaround would be to create a view for each of your subqueries.

    Then access those views from within your view view_credit_status

提交回复
热议问题