一、多表查询 可能会用到的注解 这里的场景是,查询每个用户及其所有的订单。就是查询你的id号的同时,把你所有的历史订单信息都拉出来。 表结构这样 CREATE TABLE User ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, birthday VARCHAR(10) ); INSERT INTO User (id, username, password, birthday) VALUES (1, 'Alice', 'password123', '1990-01-01'), (2, 'Bob', 'pass456word', '1992-05-10'), (4, 'Bob', 'pass456word', '1992-05-10'), (3, 'Bob', 'pass456word', '1992-05-10'), (5, 'Bob', 'pass456word', '1992-05-10'), (6, 'Bob',...
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Get in touch with return
Contact return, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack