yydeng626 opened a new pull request, #30002:
URL: https://github.com/apache/shardingsphere/pull/30002
Fixes #29193.
Changes proposed in this pull request:
- support sql
```
1. INSERT INTO [HR].[Employees]
(
[SSN]
, [FirstName]
, [LastName]
, [Salary]
)
VALUES
(
'990-00-6818'
, N'Kim'
, N'Abercrombie'
, $55415
)
2. UPDATE HumanResources.Employee
SET JobTitle = N'Executive'
WHERE NationalIDNumber = 123456789
IF @@ROWCOUNT = 0
PRINT 'Warning: No rows were updated' // remark " IF @@ROWCOUNT = 0
PRINT 'Warning: No rows were updated' " do not parser , because it do not
affect rows
3. INSERT [SourceDatabase].[dbo].[SourceTable]
VALUES (1, N'Bob'),
(2, N'Susan')
4. INSERT [DestinationDatabase].[dbo].[DestTable_InMem]
SELECT * FROM [SourceDatabase].[dbo].[SourceTable]
5. SELECT
[req].[session_id],
[req].[start_time],
[req].[cpu_time] AS [cpu_time_ms],
OBJECT_NAME([ST].[objectid], [ST].[dbid]) AS [ObjectName],
SUBSTRING(
REPLACE(
REPLACE(
SUBSTRING(
[ST].[text], ([req].[statement_start_offset] / 2) + 1,
((CASE [req].[statement_end_offset]
WHEN -1 THEN DATALENGTH([ST].[text])
ELSE [req].[statement_end_offset]
END - [req].[statement_start_offset]
) / 2
) + 1
), CHAR(10), ' '
), CHAR(13), ' '
), 1, 512
) AS [statement_text]
FROM
[sys].[dm_exec_requests] AS [req]
CROSS APPLY [sys].dm_exec_sql_text([req].[sql_handle]) AS [ST]
ORDER BY
[req].[cpu_time] DESC
```
---
Before committing this PR, I'm sure that I have checked the following
options:
- [ ] My code follows the [code of
conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/)
of this project.
- [ ] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the
pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C
-Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added corresponding unit tests for my changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]