How to make a division in SQL

后端 未结 2 1935
谎友^
谎友^ 2021-01-29 14:53

Let\'s say I have the following table:

CREATE TABLE orders (
    Order_ID int,
    Product_ID int,
    PRIMARY KEY(Order_ID,Product_ID)
);

INSERT INTO orders VA         


        
2条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-29 15:23

    If I've understood you correctly:

    Select ID
    From table_name
    where P_ID = 2
    

提交回复
热议问题