Found 118 Articles for SQL

How to executes an SQL SELECT statement in a JSP?

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

2K+ 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

5K+ 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

2K+ 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

637 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

Conversion Functions in SQL

David Meador
Updated on 20-Jun-2020 08:00:07

1K+ Views

There may be times when the SQL query was expecting some data type but it got another. In that case type conversion is done by SQL. This is implicit type conversion. However, sometimes the programmer explicitly converts one data type into another in a query. This is known as explicit type conversion. Both of these in detail are given as follows:Implicit Data Type ConversionIn implicit data type conversion, the SQL programmer does not specify anything. Rather the system converts one type of data to another as per its requirements. For example - a numeric data type can be converted to ... Read More

Mathematical Functions in SQL

Amit Diwan
Updated on 20-Jun-2020 07:55:29

13K+ Views

Mathematical functions are very important in SQL to implement different mathematical concepts in queries.Some of the the major mathematical functions in SQL are as follows −ABS(X)This function returns the absolute value of X. For example −Select abs(-6);This returns 6.MOD(X, Y)The variable X is divided by Y and their remainder is returned. For example −Select mod(9, 5);This returns 4.SIGN(X)This method returns 1 if X is positive, -1 if it is negative and 0 if the value of X is 0. For example −Select sign(10);This returns 1.FLOOR(X)This returns the largest integer value that is either less than X or equal to it. ... Read More

Loading an individual column in SAP HANA using SQL

SAP Developer
Updated on 13-Mar-2020 07:59:07

215 Views

Yes, you can open SQL console and execute the statement −LOAD (, ...);This SQL query will load or unload entire column into or from main memory. Its load status is TRUE or FALSE. The table's load status is PARTIALLY.

What is HTML5 IndexedDB and why it is used?

Samual Sam
Updated on 29-Jan-2020 10:12:28

107 Views

The indexeddb is a new HTML5 concept to store the data inside user's browser. indexeddb is more power than local storage and used for applications that require storing a large amount of the data. These applications can run more efficiently and load faster.The W3C has announced that the Web SQL database is a deprecated local storage specification so web developer should not use this technology anymore. indexeddb is an alternative for web SQL database and more effective than older technologies.The following are the characteristics: stores key-pair values not a relational database IndexedDB API is mostly asynchronous not a structured query language has supported to access ... Read More

Advertisements