欧美1区2区3区激情无套,两个女人互添下身视频在线观看,久久av无码精品人妻系列,久久精品噜噜噜成人,末发育娇小性色xxxx

Customers 表有字段顧客名稱cust_name、顧客id cust_id cust_id cust_name cust10 andy cust1 ben cust2 tony cust22 tom cust221 an cust2217 hex Orders訂單信息表,含有字段order_num訂單號、cust_id顧客id order_num cust_id a1 cust10 a2 cust1 a3 cust2 a4 cust22 a5 cust221 a7 cust2217 【問題】 編寫 SQL 語句,返回 Customers 表中的顧客名稱(cust_name)和Orders 表中的相關(guān)訂單號(order_num),并按顧客名稱再按訂單號對結(jié)果進行升序排序。你可以嘗試用兩個不同的寫法,一個使用簡單的等聯(lián)結(jié)語法,另外一個使用 INNER JOIN。 【示例結(jié)果】cust_name代表用戶名稱cust_name和訂單號order_num。 cust_name order_num an a5 andy a1 ben a2 hex a7 tom a4 tony a3 【示例解析】顧客名稱為an的cust_id為cust221,他的訂單號為a5。
示例1

輸入

DROP TABLE IF EXISTS `Orders`;
CREATE TABLE IF NOT EXISTS `Orders`(
  order_num VARCHAR(255) NOT NULL COMMENT '商品訂單號',
  cust_id VARCHAR(255) NOT NULL COMMENT '顧客id'
);
INSERT `Orders` VALUES ('a1','cust10'),('a2','cust1'),('a3','cust2'),('a4','cust22'),('a5','cust221'),('a7','cust2217');

DROP TABLE IF EXISTS `Customers`;
CREATE TABLE IF NOT EXISTS `Customers`(
	cust_id VARCHAR(255) NOT NULL COMMENT '客戶id',
	cust_name VARCHAR(255) NOT NULL COMMENT '客戶姓名'
);
INSERT `Customers` VALUES ('cust10','andy'),('cust1','ben'),('cust2','tony'),('cust22','tom'),('cust221','an'),('cust2217','hex');

輸出

an|a5
andy|a1
ben|a2
hex|a7
tom|a4
tony|a3
加載中...