随笔分类 -  SQL

摘要:转载:https://blog.csdn.net/u014717572/article/details/80687042 第一部分 group by having 返回每组中的一条数据,默认(根据id)升序,即返回分组中每组id最小的那条记录。 select子句中字段要么包含在group by 子句 阅读全文
posted @ 2019-12-26 10:47 程序猿-小秦 阅读(849) 评论(0) 推荐(0)
摘要:CREATE PROC [dbo].[sp_VisitCount] ( @count INT ) AS BEGIN DECLARE @current DATETIME SET @current=GETDATE(); WITH TodayVisitTable AS ( SELECT CorpName,COUNT(CorpName) AS TodayVisit FROM ... 阅读全文
posted @ 2019-08-28 21:46 程序猿-小秦 阅读(4452) 评论(0) 推荐(0)
摘要:left join :左连接,返回左表中所有的记录以及右表中连接字段相等的记录。 right join :右连接,返回右表中所有的记录以及左表中连接字段相等的记录。 inner join: 内连接,又叫等值连接,只返回两个表中连接字段相等的行。 full join:外连接,返回两个表中的行:left 阅读全文
posted @ 2019-08-27 21:38 程序猿-小秦 阅读(1338) 评论(0) 推荐(0)
摘要:https://sqlzoo.net/wiki/SELECT_basics/zh SQL语句在线练习 http://sample.jimstone.com.cn/xsql/ SQL语句测验 http://www.w3school.com.cn/quiz/quiz.asp?quiz=sql sql语句练习50题(Mysql版) https://blog.csdn.net/fashion2014/... 阅读全文
posted @ 2019-06-12 11:47 程序猿-小秦 阅读(13309) 评论(0) 推荐(1)
摘要:在使用datastage开发的时候,遇到错误: SQL*Loader-951: Error calling once/load initialization ORA-00604: error occured at recursive SQL level 1 ORA-00054: resource b 阅读全文
posted @ 2017-07-07 13:36 程序猿-小秦 阅读(3158) 评论(0) 推荐(0)