Found 111 Articles for SQL

How to use parameterized SQL query in a JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

931 Views

The tag used as a nested action for the tag and the tag to supply a value for a value placeholder. If a null value is provided, the value is set to SQL NULL for the placeholder.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultValueValue of the parameter to setNoBodyExampleTo start with the basic concept, let us create an Employees table in the TEST database and create few records in that table as follows −Step 1Open a Command Prompt and change to the installation directory as follows −C:\> C:\>cd Program Files\MySQL\bin C:\Program Files\MySQL\bin>Step 2Login to the database as ... Read More

How to execute DELETE SQL in a JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

693 Views

The tag executes an SQL statement that does not return data; for example, SQL INSERT, UPDATE, or DELETE statements.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultsqlSQL command to execute (should not return a ResultSet)NoBodydataSourceDatabase connection to use (overrides the default)NoDefault databasevarName of the variable to store the count of affected rowsNoNonescopeScope of the variable to store the count of affected rowsNoPageExampleTo start with basic concept, let us create a simple table Employees table in the TEST database and create few records in that table as follows −Step 1Open a Command Prompt and change to the installation directory as follows ... Read More

How to execute UPDATE SQL in a JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

1K+ Views

The tag executes an SQL statement that does not return data; for example, SQL INSERT, UPDATE, or DELETE statements.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultsqlSQL command to execute (should not return a ResultSet)NoBodydataSourceDatabase connection to use (overrides the default)NoDefault databasevarName of the variable to store the count of affected rowsNoNonescopeScope of the variable to store the count of affected rowsNoPageExampleTo start with basic concept, let us create a simple table Employees table in the TEST database and create few records in that table as follows −Step 1Open a Command Prompt and change to the installation directory as follows ... Read More

How to execute SQL update query in a JSP?

Samual Sam
Updated on 30-Jul-2019 22:30:25

391 Views

The tag executes an SQL statement that does not return data; for example, SQL INSERT, UPDATE, or DELETE statements.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultsqlSQL command to execute (should not return a ResultSet)NoBodydataSourceDatabase connection to use (overrides the default)NoDefault databasevarName of the variable to store the count of affected rowsNoNonescopeScope of the variable to store the count of affected rowsNoPageExampleTo start with basic concept, let us create a simple table Employees table in the TEST database and create few records in that table as follows −Step 1Open a Command Prompt and change to the installation directory as follows ... Read More

How to executes an SQL SELECT statement in a JSP?

karthikeya Boyini
Updated on 30-Jul-2019 22:30:25

3K+ Views

The tag executes an SQL SELECT statement and saves the result in a scoped variable.AttributeThe tag has the following attributes −AttributeDescriptionRequiredDefaultsqlSQL command to execute (should return a ResultSet)NoBodydataSourceDatabase connection to use (overrides the default)NoDefault databasemaxRowsMaximum number of results to store in the variableNoUnlimitedstartRowNumber of the row in the result at which to start recordingNo0varName of the variable to represent the databaseNoSet defaultscopeScope of variable to expose the result from the databaseNoPageExampleTo start with the basic concept, let us create an Employees table in the TEST database and create few records in that table as follows −Follow these steps ... Read More

Distributed Database Management System

Kristi Castro
Updated on 20-Jun-2020 09:47:11

2K+ Views

In a distributed database management system, the database is not stored at a single location. Rather, it may be stored in multiple computers at the same place or geographically spread far away. Despite all this, the distributed database appears as a single database to the user. A diagram to better explain this is as follows:As seen in the figure, the components of the distributed database can be in multiple locations such as India, Canada, Australia, etc. However, this is transparent to the user i.e the database appears as a single entity.Types of Distributed Database Management SystemThe following are the types ... Read More

Functions in Oracle DBMS

Amit Diwan
Updated on 20-Jun-2020 09:50:11

6K+ Views

The different types of functions in Oracle are −Oracle String FunctionsOracle Numeric FunctionsOracle Date FunctionsMore details about these functions are given as follows −Oracle String FunctionsThe following are the Oracle String Functions −ASCII(str)This function returns the ASCII or numeric value of the first word in the string str provided. If it is an empty string, it returns 0. For example:SQL> SELECT ASCII('Apple'); +---------------------------------------------------------+ | ASCII('Apple') | +---------------------------------------------------------+ | 65 | +---------------------------------------------------------+ 1 row in set (0.00 sec)This returns the ASCII value of A i.e. 65 as it is the first character in the string.CONCAT(str1, str2…..strn)This function returns the string that ... Read More

Cursors in Oracle DBMS

Amit Diwan
Updated on 20-Jun-2020 08:53:39

4K+ Views

When a SQL statement is executed in Oracle, the temporary context area is created. This area contains all the relevant information relating to the statement and its execution. The cursor is a pointer to this context area and allows the PL/SQL program to control this area.There are two types of Cursors.Implicit CursorsExplicit CursorsLet us begin with Implicit Cursors −Implicit CursorsWhenever an SQL statement is executed, the implicit cursors are automatically created. This happens if there is no explicit cursor for the particular statement. Implicit cursors cannot be controlled by the programmers.There are many different attributes for Implicit Cursors. Some of ... Read More

Block of PL/SQL in Oracle DBMS

Ricky Barnes
Updated on 20-Jun-2020 08:55:16

3K+ Views

PL/SQL is a block structured language i.e the code of PL./SQL is written in the form of blocks. PL/SQL also contains the robustness, security and portability of the Oracle database.Each block of PL/SQL contains the following subparts −Declarations -  This section contains all the items that needs to be declared before the program such as variables, subprograms etc. This section contains the keyword DECLARE at its start. In general, Declarations is an optional subpart of the PL/SQL program.Executable Commands -  This section of the PL/SQL code contains the executable statements. It contains BEGIN and END at its starting and ending. ... Read More

Overview of Packages in Oracle

Alex Onsman
Updated on 20-Jun-2020 08:46:22

682 Views

Packages are SQL procedures, functions, variables, statements etc. that are grouped into a single unit. Many different applications can share the contents of a package, as it is stored in the database.Parts of a PackageThe following are the parts of a package in Oracle −Package SpecificationThe package specifications contains information about all the procedures, functions, variables, constants etc. stored inside it. It has the declaration of all the components but not the code.All the objects that are in the specification are known as public objects. If there is any object that is not available in the specification but is coded ... Read More

Advertisements