![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL
文章平均质量分 79
SQL详解
马达加斯加D
这个作者很懒,什么都没留下…
展开
-
SQL Part 1 --- 简单的SQL查询
SQL --- Structured Query LanguageSQL中的数据类型CharactersNumbersTimes and datesSQL中的表(Tables)创建SQL表CREATEINSERT简单的SQL查询SQL查询的计算步骤在查询中链接多个表Example 1:Example 2:Example 3:Example 4:常用关键字(Keywords)ORDER BY, DESCASLike, %, _星号符 *DISTINCTUnionINTERSECTEXCEPT嵌套查询 Nest原创 2021-10-26 09:29:25 · 360 阅读 · 0 评论 -
SQL Part 2 ---常用关键字
SQL --- 常用关键字常用关键字(Keywords)ORDER BY, DESCASLike, %, _星号符 *DISTINCTUnionINTERSECTEXCEPT常用关键字(Keywords)ORDER BY, DESC结果根据所选择的属性进行排序, 字符串类型根据大小写排序默认是升序(asceding), 使用DESC关键字可以变为降序SELECT Y.Yelp_ID, Y.DOB as birthdayFROM YELP_USER YORDER BY birthday原创 2022-04-25 07:46:07 · 511 阅读 · 0 评论 -
SQL Part3 --- 聚合操作符
SQL --- 聚合操作符聚合操作符 Aggregate OperatorsCOUNT(A)SUM(A)AVG(A)MAX(A), MIN(A)GROUP BY and HAVING聚合操作符 Aggregate Operators注意当使用Aggregate Operators时,target list(select 语句)中只能有aggregate attribute,不能有其他的attribute, 除非使用GROUP BY或者HAVINGCOUNT(A)Count the n原创 2022-04-25 07:53:26 · 228 阅读 · 0 评论 -
SQL Part 4 --- Joins
SQL --- JoinsJoinsInner JoinsLeft JoinsRight JoinsFull JoinsJoinsInner JoinsSELECT StudentCourse.COURSE_ID, Student.NAME, Student.AGE FROM StudentINNER JOIN StudentCourseON Student.ROLL_NO = StudentCourse.ROLL_NO;Left JoinsSELECT Student.NAME,原创 2022-04-25 07:55:31 · 225 阅读 · 0 评论 -
SQL Query
SQL QueryTablesQueriesTablesCREATE TABLE YELP_USER ( Yelp_ID VARCHAR(10) PRIMARY KEY, Email VARCHAR(30) NOT NULL, FN VARCHAR(10) NOT NULL, LN VARCHAR(10) NOT NULL, DOB DATE NOT NULL, BirthPlace VARCHAR(30) NOT NULL, Gender CHA原创 2022-01-07 07:47:20 · 528 阅读 · 0 评论