Databases often have to deal with each other, but you never thought about how data is stored inside the database.
Explore how data is stored inside a database today, from the following points
How to store data inside a database
How index data is stored
Effect of operational data on storage
How to store data inside a database
1. To ...
Posted on Thu, 02 Apr 2020 20:20:18 -0400 by t3l
CREATE PRoc [Name]
@parameter Data type,
@parameter data type
select INSERT UPDATE (SQL)
--Basic statement fast
--These are statement Libraries
--Let's see the one without parameters first. It can take parameters or not (I haven't used the one without parameters several times, of course)
--Get a table. It fee ...
Posted on Sat, 22 Feb 2020 02:42:30 -0500 by behrk2
A netizen asked that in SQL, the balance of each transaction should be calculated. His screenshot Description:
To achieve this function, the key is to obtain the value of the eqty field of the previous record.
Next, Insus.NET tries to write it. The easiest way to do this is to loop through each record. Then you can calculate qty plus ...
Posted on Wed, 01 Jan 2020 17:27:54 -0500 by benracer
In the SQL Server database, most of the operations that have been done since the login and what has happened in the database can be traced, but some of them can't be traced.
1, Database start record
1. Last time SQL Server was started
select sqlserver_start_time from sys.dm_os_sys_info;
--You can also refer to the creation time of the s ...
Posted on Sat, 28 Dec 2019 11:35:16 -0500 by binto
First, create the tables ProcSqlTable and BackProcSqlTable under the master database. ProcSqlTable stores the current version code of stored procedure, and BackProcSqlTable stores the historical version code.
CREATE TABLE [dbo].[BackProcSqlTable](
[id] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY ,--number
[dbName] [nvarcha ...
Posted on Mon, 23 Dec 2019 12:44:01 -0500 by dbchip2000
Background: the SQL statement query in the production environment is too slow (the total data is about 3.5 million), and the log center keeps alarming
Solution: after analyzing the failure, turn to the DBA of the company. After analyzing the DBA, it is recommended to specify the index in the statement
Solution: specify the index in the SQL st ...
Posted on Thu, 12 Dec 2019 09:46:05 -0500 by Thresher
1. First, it shows the statement of creating sql server stored procedure, creating a simple stored procedure for testing.
1 SET ANSI_NULLS ON
3 SET QUOTED_IDENTIFIER ON
6 CREATE PROCEDURE [dbo].[register_info]
7 @name varchar(50),
8 @sex char(1),
9 @idcard char(30),
10 @phone varchar(15),
Posted on Sun, 08 Dec 2019 10:24:25 -0500 by readourlines
Recently, the project needs to crawl some data, the data is encrypted, the front-end js is confused, the ajax request is hook, some complex, and finally plans to use puppeter to crawl the data.
Puppeter is a project that the Google team is maintaining. The original intention is mainly to do automatic testing of web pages. The official Hea ...
Posted on Wed, 04 Dec 2019 11:45:18 -0500 by breadcom
Three different data De duplication methods will be shared belowData De duplication: it needs to be defined according to a certain field. When there is more than one line of records in this field, we define that there are duplicates in this line of data.
Data De duplication method 1: When the maximum SN is in the table, we can get ...
Posted on Mon, 02 Dec 2019 01:35:04 -0500 by PandaFi
SELECT and SET can be used to assign values to variables in SQL SERVER, but their usage and effect are different in some details.
1. In terms of variable assignment, SET is the ANSI standard assignment method, while SELECT is not. This is one of the reasons why SET is recommended.
2. SELECT can assign multiple variables at one time, while SET c ...
Posted on Mon, 02 Dec 2019 00:12:37 -0500 by Daggeth