Category:MsSql

  • CentOS install SQL Server vNext ctp1 tutorial

    Time:2019-12-15

    Today, Microsoft officially released SQL Server 2016 Sp1. According to the previous SP1 law, it can be used in the production environment. The standard version with SP1 will have almost all the functions of the enterprise version. Only environments with more than 128GB ram or more than 24 cores or more than 4 channels ram […]

  • SQLServer2005 linked server usage

    Time:2019-12-15

    After querying the data, it is known that there is a system stored procedure sp_addlinkedserver, which can be connected to MySQL through ODBC, so you can download the ODBC driver, which can be obtained through the MySQL official website, address: http://dev.mysql.com/downloads/. After installing the driver, configure the data source. Note here that to use the […]

  • The difference between cast and convert in SQL Server

    Time:2019-12-14

    The difference between cast and convert in SQL Server In SQL server, both cast and convert functions can be used for type conversion, It’s just that the grammar is different Cast is generally easier to use. The advantage of convert is that it can format dates and values select CAST(‘123’ as int) — 123 select […]

  • Subtotal summary of SQL rollup usage

    Time:2019-12-14

    Here is an example of SQL Server 2005: CREATE TABLE tb(province nvarchar(10),city nvarchar(10),score int)Insert TB select ‘Shaanxi’, ‘Xi’an’, 3Union all select ‘Shaanxi’, ‘Ankang’, 4Union all select ‘Shaanxi’, ‘Hanzhong’, 2Union all select ‘Guangdong’, ‘Guangzhou’, 5Union all select ‘Guangdong’, ‘Zhuhai’, 2Union all select ‘Guangdong’, ‘Dongguan’, 3Union all select ‘Jiangsu’, ‘Nanjing’, 6Union all select ‘Jiangsu’, ‘Suzhou’, 1GO 1. […]

  • SQL Server 2005 solution of “database backup in backup set is different from existing database”

    Time:2019-12-13

    Previously, SQL Server 2000 has been used, but now it is so tight with the trend. In addition, it is required to use SQL Server 2005 in the current project. For SQL Server 2005, there are several points to pay attention to. For example, when restoring a database, unlike 2000, which distinguishes the database and […]

  • The difference between order by and group by in SQL

    Time:2019-12-13

    In English, order by means of row sorting, which is ascending by default. The sorted field names must be listed after order by, which can be multiple field names. Group by means of English. There must be an aggregate function to work with. At least one grouping flag field is required. What is aggregate function? […]

  • The usage difference between having and where in database SQL

    Time:2019-12-12

    “Where” is a constraint declaration. Where is used to constrain the data of the database. Where works before the result is returned, and aggregate functions cannot be used in where. “Having” is a filter declaration. It is a filter operation on the query results after the query returns the result set. The aggregation function can […]

  • SQL2005 learning notes common table expression (CTE)

    Time:2019-12-12

    A common table expression (CTE) can be considered a temporary result set defined within the execution scope of a single select, insert, update, delete, or create view statement.CTE is similar to derived tables in that it is not stored as an object and is only valid during a query.Unlike derived tables, CTEs can be self […]

  • The method of dividing big business into small business distribution in SQL Server Replication

    Time:2019-12-11

    In SQL Server Replication, when a large transaction is executed in the publishing database, such as one-time operation of 100000 or more data. When the operation data is executed in the publishing database, the log reader agent will scan the transaction log and deliver it to the distribution database at one time. If the last […]

  • SQL2005 learning notes apply operator

    Time:2019-12-11

    Use the apply operator to call a table valued function for each row returned by an external table expression that implements the query operation.The table valued function is the right input and the external table expression is the left input.By evaluating the right input, the calculation results of each row of the left input are […]

  • How to quickly delete the options in the drop-down list box of SQL server login name

    Time:2019-12-10

    Question: I used to create a login name such as KPI, and then delete it in “security login”. But every time I log in, the login name KPI will always be displayed in the Login Name drop-down box. How can I delete it? Solution: 1). SQL Server 2008 R2 and SQL Server 2008 Close the […]

  • SQL2005 learning notes excel and intersect operators

    Time:2019-12-10

    1. introduction The except and intersect operators allow you to compare the results of two or more select statements and return non repeating values.2. differenceThe except operator returns all non repeating values returned by the query to the left of the except operator and not included in the values returned by the query to the […]