我的数据库中有两个表students:
GRADE_REPORT:
+----------------+-------------+------+
|Student_No . | SectionId | Grade|
+----------------+-------------+------+
| 11 | 85 | B |
| 17 | 112 | B |
| 17 | 119 | C |
| 17 | 135 | A |
| 8 | 85) | A |
| 8 | 92 | A |
+----------------+-------------+------+
Run Code Online (Sandbox Code Playgroud)
学生:
+----------------+-------------+------+--------+----------------+
| Studentnumber | name | Classification| DepartmentName |
+----------------+-------------+---------------+----------------+
| 17 | Bill Smith | 1 | CS |
| 8 | Bob …Run Code Online (Sandbox Code Playgroud) 我知道,有人告诉我,微软在 MSDN 下有一个 per-dev doc 系统。具体来说,我正在寻找有关 WAL 日志内部格式的文档。这在任何地方都有记录吗?第三方肯定可以访问这个吗?
而且,无论如何,是否可以在不先付费的情况下知道 MSDN 记录的内容?
SQL Server 内部还有哪些其他文档来源?
我的任务是调查应用程序的工作由于死锁而失败的问题。我知道使用跟踪来捕获死锁,但是由于这是 16 小时前发生的事情,我想知道是否可以查看导致死锁的原因?
谢谢
我继承了一些这样的代码:
SELECT
Col_1,
Col_2 Col_2,
Col_3
...
Run Code Online (Sandbox Code Playgroud)
别名Col_2实际上有什么作用,还是完全没有必要?
下面的代码有问题。
错误:
Msg 206, Level 16, State 2, Procedure usp_TRAC_PSE_Step_12_Resource_Request_OBJECT-Production-Part1, Line 93
Operand type clash: int is incompatible with datetime2
Run Code Online (Sandbox Code Playgroud)
代码:
insert into [dbo].[pse__Resource_Request__c_LOAD]
(OwnerId, pse__End_Date__c, pse__Milestone__c, pse__Percent_Allocated__c, pse__Planned_Bill_Rate__c,
pse__Practice__c, pse__Project__c, pse__Region__c, pse__SOW_Hours__c, pse__Request_Priority__c,
pse__Resource_Request_Name__c, pse__Resource_Role__c, pse__Start_Date__c, pse__Status__c,
Partner_Requested__c, OA_Migration_ID__c, CurrencyIsoCode, Percent_Onsite__c)
select (select [OwnerId] from [dbo].[pse__Proj__c_LOAD] where [OA_Migration_ID__c] = p.id) 'OwnerId'
, case when case when p.custom_35 is null then ISNULL(b.startdate, '01/01/1900 23:59:59.999') + 180 else p.custom_35 end < ISNULL(b.startdate, '01/01/1900 23:59:59.999') then ISNULL(b.startdate, '01/01/1900 23:59:59.999') + 180 else …Run Code Online (Sandbox Code Playgroud) 即使我添加了所有建议的索引,我的存储过程有时也会花费很长时间。我不断收到查询必须等待内存授予 查询计划可以在这里找到:查询计划
sql-server stored-procedures execution-plan query-performance
我有几个关于分区的问题。我打算将现有的分区方案/函数放入table1,然后将新的分区方案/函数指向table1. 我知道如何继续这个过程,但在此之前,我想对以下问题提出一些建议/答案:
如果我删除旧的/现有的分区方案/功能以及表中的数据,旧partition.ndf文件中的数据会发生什么?它们会被删除或修改吗?
如果我删除旧的/现有的分区方案/功能,表中有数据,表中的数据会发生什么?会不会有记录丢失?