Preface: Because I want to write an Android app to obtain movie data from the server, I need to build server-side code. I have learned C# before, so I want to use C# to implement the server segment code for testing. This article uses C# language and asp. The net core web api component builds […]
Tag: sql-server
How to maintain MySQL server using offline mode
Offline mode As a DBA, one of the most common tasks is to batch start and stop the MySQL service or some other activities. Before stopping the MySQL service, we may need to check if there are active connections; if so, we may need to kill them all. Usually, we use pt-kill to kill the […]
SQL server database basic statements
Table of Contents Basic operations Create database Open database Create a new data table Insert record Modify records Delete Record Inquire Delete database Delete table System stored procedure procedure Modify table field name Modify table name Modify database name Modify table structure add a column Delete a column Modify a column Add constraints Change database […]
KingbaseES database rewrites SQL Server database CROSS APPLY and OUTER APPLY
1. Function introduction: CROSS APPLY and OUTER APPLY are a connection operation in SQL Server. Similar to the JOIN statement, a table can be associated with a table function or a subquery. A table function is a function that returns data of a table type, and a subquery is a query nested within an outer […]
[SQL Server bit by bit accumulation] The skill of sp_helpdb & sp_send_dbmail
Detailed explanation of Exec msdb.dbo.sp_send_dbmail parameters sp_send_dbmail [ [ @profile_name = ] ‘profile_name’ ] [ , [ @recipients = ] ‘recipients [ ; n ]’ ] [ , [ @copy_recipients = ] ‘copy_recipient [ ; n ]’ ] [ , [ @blind_copy_recipients = ] ‘blind_copy_recipient [ ; n ]’ ] [ , [ @subject = […]
Spring boot + sql server large data volume added in batches
1.SQLServerBulkCopy method (recommended for no weird bugs) Code /** * Get all attribute annotations @TableId and @TableField in the class * * @param instance * @return * @throws NoSuchFieldException */ public static Map<String, String[]> getDeclaredFieldsInfo(Object instance) throws NoSuchFieldException { Map<String, String[]> map = new HashMap(); Class<?> clazz = instance.getClass(); Field[] fields = clazz.getDeclaredFields(); StringBuilder stringBuilder […]
[Query Oracle database data in sql server]
Write a custom directory title here question Introduction to CLR accomplish Question Because sqlserver has performance issues with big data, part of the data is in the Oracle database. In order to facilitate querying or inserting Oracle data in the stored procedure, the method of adding an external assembly to SqlServer and calling the external […]
[SQL Server] Foreign key constraints
Foreign key constraints prologue foreign key constraints Preamble In many scenarios, foreign keys are used to associate the master-slave relationship between two or more tables, so as to quickly query the relationship between data through foreign key fields. In fact, foreign keys are still relatively vague in my concept, and I have never really used […]
[Database] Sql Server 2022 obtains target data through logical processing through temporary tables and cursor traversal
2023, Week 39. Give yourself a goal, and then stick to it and you will always get something. If you don’t believe me, try it! Today, a friend asked me about a problem with Sql Server data processing. I just wanted to review the knowledge about Sql Server temporary tables and cursors. Directory 1. Description […]
How to use SQL Server cursors [Transfer]
Original text excerpted from: http://www.cnblogs.com/moss_tan_jun/archive/2011/11/26/2263988.html Cursors are evil! In relational databases, our thinking about queries is set-oriented. The cursor breaks this rule. The cursor makes our way of thinking change to line by line. For C-like developers, this way of thinking will be more comfortable. The normal way of thinking about collections is: And for […]