Tag:sqlserver

  • Install SQL Server tutorial under Ubuntu

    Time:2019-10-24

    Microsoft has just announced a public preview of the next generation of SQL Server, and Canonical has officially announced that this preview version is available for Ubuntu. Whether deployed in-house or in the cloud, SQL Server on Ubuntu offers developers and organizations more freedom of choice. The development languages and data types allowed by SQL […]

  • SqlServer 2005 ranking function using summary

    Time:2019-10-23

    Although other ranking functions are technically similar in calculation to ROW_NUMBER, they are much less useful in practice. 10. RANK and DENSE — your RANK is primarily used for ranking and scoring points. NTILE is more used for analysis. First create a sample table: Copy the codeThe code is as follows: SET NOCOUNT ON USE […]

  • SQL Server 2005 simple full text retrieval

    Time:2019-10-21

    Copy codeThe code is as follows: –View the current database status 1 as full-text indexing enabledSelect databaseproperty (‘Database name ‘,’ isfulltextenabled ‘)–Open fulltext functionexecute sp_fulltext_databse ‘enable’ –Turn this feature offexecute sp_fulltext_databse ‘disable’ –Create a full-text index catalog–Drop fulltext directory nameCreate fulltext catalog directory name–Each table can only have one full-text index, which is stored in […]

  • SQL Server: trigger instance details

    Time:2019-10-20

    1. overview Trigger is a special stored procedure, which can not be called explicitly, but is activated automatically when inserting records, updating records or deleting records into a table. So triggers can be used to implement complex integrity constraints on tables. 2. Classification of triggers SQL Server 2000 provides two types of triggers: “embedded of” […]

  • Solution of sqlserver 2005 / 2008 database being marked as “suspicious”

    Time:2019-10-18

    Background: During the daily operation of SQL Server 2005 relational database, sometimes some abnormal operations are carried out on the database (such as: SharePoint website configuration database name SharePoint ﹣ config). For example, when the database is reading and writing, it stops the database without any reason, resulting in abnormal interruption of SQL Server 2005 […]

  • Settings of auto add fields for each database (mysql, PostgreSQL, Oracle, MSSQL)

    Time:2019-10-17

    In the process of database design, we usually set the ID field in the database table to auto increment. Here are the commonData dictionary tableFor example, it shows how to set the auto increment field under each database. MySQL Mysql database only needs to be added on the target fieldAUTO_INCREMENT, and set for tableAUTO_INCREMENT=x。x: number […]

  • Application of SQL server for XML path statement

    Time:2019-10-17

    Copy codeThe code is as follows: DECLARE @TempTable table(UserID int , UserName nvarchar(50)); insert into @TempTable (UserID,UserName) values (1,’a’) insert into @TempTable (UserID,UserName) values (2,’b’) select UserID,UserName from @TempTable FOR XML PATH Running this script will generate the following results: Copy codeThe code is as follows: <row> <UserID>1</UserID> <UserName>a</UserName> </row> <row> <UserID>2</UserID> <UserName>b</UserName> </row> You […]

  • SQL server address search performance optimization

    Time:2019-10-16

    This is an example from a long time ago. Now when sorting out the data, I don’t realize it, so I take it out and rewrite it for sharing. 1. demand 1.1 basic requirements: search the complete address path according to the entered address keyword, and the time consumption shall be controlled within tens of […]

  • SQL Server 2005 Job Setting Timing Task

    Time:2019-10-15

    The company has an old project which saves the pictures taken by the terminal directly in binary form to the database. Because the database is large, it needs to delete these redundant data frequently. Manual deletion is time-consuming and laborious. The project leader asked me to turn these operations into automatic ones, which are executed […]

  • SqlServer Query SQL Execution Time

    Time:2019-10-14

    set statistics profile on set statistics io on set statistics time on go Write your SQL statement here… go set statistics profile off set statistics io off set statistics time off

  • Copy a Data Table with SQL Language

    Time:2019-10-13

    Several methods of replicating tables in SQL: SQL replicates the entire table select * into NewTableName from OldTableName Copy only column names, not content select * into NewTableName from OldTableName where 1 = 0 Inter-table data replication insert into NewTableName(zt) select titile from OldTableName

  • Implementation of Database Entity Definition for Spring Boot

    Time:2019-10-9

    Articles Series Hello World of Sprint Boot Introduction to Program Structure Design of Sprint Boot Preface This article begins with code practice, and the system design starts from bottom to top. So this article first introduces how to realize the design and implementation of database table entity class. The persistence layer framework of SpringBook database […]