mysql count(*) count count(id) explanation

Environment wins10 8g memory mysql5.7.27 mysql my.ini Configuration note (innodb_flush_log_at_trx_commit=0) configuration [Client] #Set 3306 port port = 3306 [mysqld] #Set 3306 port port = 3306 # Set the installation directory of mysql basedir=E:devmysql-5.7.27-winx64 # Set the storage directory of mysql database data datadir=E:devmysql-5.7.2 ...

Posted on Sun, 31 May 2020 10:10:15 -0400 by cofey12681

Stored procedure - exception capture & printing exception information

catalog 0. Background 1. Create the exception information table ErrorLog 2. Establish a stored procedure to save exception information 3. Establish a stored procedure for printing exception information in SQL Server 4. Create a stored procedure for testing to throw exceptions for testing 5. Reference information ...

Posted on Wed, 13 May 2020 21:17:48 -0400 by solodesignz

Introduction to Oracle (PLSQL) 8

Learning video: https://www.bilibili.com/video/BV1tJ411r7EC?p=75 Cursor: a container for holding multiple pieces of data. You need to start open ing and closing. Use "fetch...into..." to move the cursor down. declare cursor myCursor is select * from emp; yb myCursor%rowtype; begin open myCursor; for i in 1 .. 3 loop f ...

Posted on Wed, 06 May 2020 12:43:45 -0400 by ecko

Mysql series -- Chapter 6 triggers and stored procedures

Chapter 6 trigger and stored procedure of Mysql 1, Trigger 1. Passive. It is not executed by the user, but automatically executes a series of sql when the conditions are met 2. Trigger conditions: insert, update, delete 3. Trigger time can be divided into: after, before Create a trigger (insert a piece of data i ...

Posted on Mon, 04 May 2020 09:09:49 -0400 by hiroshi_satori

Learning notes of c-orm: basic usage of Dapper

I. Basic Knowledge 1.1 introduction to Dapper Dapper is a micro ORM under. NET. It is different from Entity Framework or NHibnate. It is lightweight and semi-automatic (entity classes should be written by themselves). If you like the original Sql statement and the simplicity of ORM, you will definitely like dapper's orm. 1.2 advantages of Dappe ...

Posted on Wed, 29 Apr 2020 04:05:24 -0400 by kooks

Oracle uses FY recover data to recover data deleted by truncate

(1) Overview of truncate operation In production, truncate is used more commands. In the case of improper use, it often results in the loss of all the data in the table, making recovery more difficult. For truncate recovery, there are several common methods for recovery: Import using a data pump. This method is easy to operate, provided that ...

Posted on Tue, 21 Apr 2020 23:00:20 -0400 by pherrick

Simple use of cursors in Oracle stored procedures

Originally: How does a query statement in a stored procedure return multiple rows of results? We know that if a query statement in a stored procedure has multiple rows of result output, it will fail: ORA-01422: exact fetch returns more than requested number of rows If you want a query statement in a stored ...

Posted on Mon, 13 Apr 2020 12:16:20 -0400 by Roja

SQL Server create server and database level audit

I. overview The concept of audit has been introduced in the previous article; this article focuses on how to create an audit and which audit specifications to collect.   2, Common approval objects 2.1 server audit object 1.FAILED_LOGIN_GROUP( Audit Login Failed Event Class) Indicates that the principal attemp ...

Posted on Mon, 13 Apr 2020 01:54:31 -0400 by chuender

Oracle database (10) - stored procedure

stored procedure Create stored procedure CREATE PROCEDURE TEST AS BEGIN DBMS_OUTPUT.PUT_LINE('My first process!'); END; --implement --SERVEROUTPUT Set, want to DBMS_OUTPUT.PUT_LINE Successful output requires SERVEROUTPUT Option set to ON State SHOW SERVEROUTPUT SET SERVEROUTPUT ON BEGIN TEST; END; --Also in ...

Posted on Sat, 04 Apr 2020 11:46:43 -0400 by biggieuk

The use of triggers in SQL

Creating a trigger is a special stored procedure, which is executed automatically without return value   Type: 1. After trigger (for) executes the corresponding statement first, and then the statement in the trigger 2. The pre trigger does not actually execute the trigger statement (insert, update,delete), but the statement after the execution ...

Posted on Fri, 03 Apr 2020 16:34:56 -0400 by minidak03