USERENV function in Oracle

USERENV is an advanced function that the Oracle database supports. It is used to get the information about the current Oracle session. The USERENV function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i. Syntax: USERENV (parameter) Parameters: parameter: It is used to … Read more

SQLCODE function in Oracle

SQLCODE function is used within the Exception Handling section of a code. It is used to get the error number. Here, the error number is associated with the most recently raised error exception. Syntax: SQLCODE Example: EXCEPTION WHEN OTHERS THEN Raise_application_error (-20001, ‘Error detected – ‘||SQLCODE||’ -ERROR- ‘||SQLERRM); END;EXCEPTION WHEN OTHERS THEN Raise_application_error (-20001, ‘Error … Read more

SQLERRM function in Oracle

SQLERRM function is used within the Exception Handling section of a code. It is used to get the error message. Here, the error message is associated with the most recently raised error exception. Syntax: SQLERRM Example: EXCEPTION WHEN OTHERS THEN Raise_application_error (-20001, ‘Error detected – ‘||SQLCODE||’ -ERROR- ‘||SQLERRM); END;EXCEPTION WHEN OTHERS THEN Raise_application_error (-20001, ‘Error … Read more

CREATE TABLE in Oracle

CREATE TABLE To create a new table in the database, Oracle provides the Oracle CREATE TABLE statement. Syntax: CREATE TABLE schema_name.table_name ( column_1 data_type column_constraint, column_2 data_type column_constraint, … table_constraint ); Parameters: schema_name: It is used to specify the name of the schema to which the new table belongs. table_name: It is used to specify … Read more

ORACLE Introduction

WHAT IS ORACLE? Oracle database often called as Oracle RDBMS, OracleDB, or simply Oracle is a relational database management system, developed and marketed by the Oracle Corporation. The Oracle Corporation is a software company, also known as one of the biggest providers in the database business. It has earned its reputation because of various reasons. … Read more

Conditions in MariaDB

Conditions in MariaDB are generally used with SELECT statement, with CRUD operations. Below is the list of conditions supported in MariaDB.   CONDITION USES AND When 2 or more conditions to be met. OR When any one of the conditions are met. AND & OR When AND & OR both conditions are met. LIKE Simple … Read more

Regular Expressions in MariaDB

MariaDB Regular Expressions Regular expression-based matching is possible in MariaDB through the REGEXP Operator. Syntax: expression REGEXP pattern   Parameters: expression: It is used to specify a character expression such as a column or field. pattern: It is used to specify the regular expression matching information. The value of the pattern can be:   VALUE … Read more

Procedure in MariaDB

MariaDB Procedure A procedure in MariaDB can be simply understood as a stored program that is used to pass parameters into it. However, unlike functions, it does not return a value. MariaDB Create Procedure: Syntax: To create a procedure in MariaDB database. CREATE [ DEFINER = { CURRENT_USER | user_name } ] PROCEDURE procedure_name [ … Read more

Function in MariaDB

MariaDB Functions A function in MariaDB can be simply understood as a stored program that is used to pass parameters into them and that returns a value. MariaDB allow the users to create their own function. It also facilitates to eliminate or remove an already existing function from the MariaDB database. MariaDB Create Function: Syntax: … Read more

MariaDB Export

MariaDB Export To export a MariaDB database using HeidiSQL, follow the below steps: Right-click on your database name in the left column. Select “Export database as SQL” from the dropdown menu. Select the location to export your database Specify a name also and then click on the export button. The database is thus exported. Click … Read more