Category:MsSql
-
Time:2021-3-7
meaning: LEN Function returns the length of the value in a text field. Returns the number of characters in a character expression SQL LEN() grammar SELECT LEN(column_name) FROM table_name give an example: 1、LENReturn the same value for the same single byte and double byte string, such as Chinese character, English character, symbol. Note: lenWhen the […]
-
Time:2021-3-6
In SQL server query conditions, can variables be used in in? If you can, are there any places or restrictions that need attention? Before answering this question, let’s take a look at this example IF EXISTS (SELECT 1 FROM sys.objects WHERE name=’TEST’ AND type=’U’) BEGIN DROP TABLE TEST; END GO CREATE TABLE TEST ( ID INT, NAME […]
-
Time:2021-3-6
Introduction to metadata The most common definition of metadata is “structural data about data”, or simply “information about data”. Legends, library catalog cards and business cards in daily life can be regarded as metadata. In relational database management system (DBMS), metadata describes the structure and meaning of data. For example, when managing and maintaining SQL […]
-
Time:2021-3-5
There are two free versions of SQL Server 2017 Developer Edition Express Edition However, the introduction to the two versions of Microsoft’s official SQL server download page is relatively general, so it is difficult to see which one is more suitable for my current development and testing needs. https://www.microsoft.com/en-us/sql-server/sql-server-downloads Introduction of developer SQL Server 2017 […]
-
Time:2021-3-5
1、 Optimize SQL steps 1. Understand the execution frequency of various SQL through show status and application characteristicsThe server status information can be provided by show status, or obtained by mysqladmin extend d-status command. Show status can display the statistical results of session level and global level as needed. For example, the current session: show […]
-
Time:2021-3-4
1、 Passphase encryption 1.1 summary 1) For emergency data encryption without certificate and key, the data can be encrypted and decrypted directly based on the password provided by the user. 2) A pass phrase is a password that allows spaces. This passphase will not be stored in the database, which means that it will not […]
-
Time:2021-3-4
In today’s article, I want to show you how to communicate your work and thinking process to the query optimizer when you want to create an index design for a specific query. Now let’s discuss it together! Query with questions Let’s look at the following query: DECLARE @i INT = 999 SELECT SalesOrderID, SalesOrderDetailID, CarrierTrackingNumber, […]
-
Time:2021-3-3
We know that if the sequence numbers in the database are used up or exhausted due to improper type setting or business explosion and other reasons, an error like the following will occur: Msg 11728, Level 16, State 1, Line 25 The sequence object ‘SEQ_OVER_TEST’ has reached its minimum or maximum value. Restart the […]
-
Time:2021-3-3
SQL Server database backup “operating system error 5 (access denied)”. Backup database is terminating abnormally. ” Wrong. How can we solve this problem? Xiao Bian today recommends a solution for you. Generally, this error occurs when the directory selected for the backup file is the root directory of the disk or the partition selected for […]
-
Time:2021-3-2
Since SQL Server 2005 SP1, SQL has supported database mirroring. The purpose of its design is to provide SQL Server with a disaster recovery technology with real-time data synchronization, that is, it can provide redundant data backup, which is more convenient to switch. There can only be one mirror database per principal database. As a […]
-
Time:2021-3-2
Simulation scenario 1: To adjust the structure of a table in the database, add several fields, and then refresh the previous data. The content of refresh is to match one of the existing fields URL, and then update the newly added fields type and typeID. Later, I wrote a shell script to brush the data. […]
-
Time:2021-3-1
1、 Introduction Using openrowset and opendatasource functions of SQL server, you can read Excel data just like querying data table. However, it’s not so easy to make these two functions work normally. If you don’t understand or configure them well, you will doubt your life by reporting errors all the way. 2、 Configuration 2.1 component […]