Found 105 Articles for SQL

Subquery in SQL

David Meador
Updated on 20-Jun-2020 08:58:40
A subquery is a query within a query i.e a nested query. It is placed inside a query and its result is used to further evaluate the outer query.There are some rules that a subquery must follow in SQL. Some of these are −The subquery should be placed within parenthesis.The subquery can be used with different operators like ,=, IN, BETWEEN etc. Also operators like SELECT, INSERT, DELETE, UPDATE etc. be used.The ORDER BY operator cannot be used in the subquery. However, it can be there in the main query.A subquery cannot be written with a BETWEEN operator. But the ... Read More

Special Operators in SQL

Amit Diwan
Updated on 20-Jun-2020 09:06:26
The different special operators in SQL are as follows −ALL operatorANY OperatorBETWEEN OperatorEXISTS OperatorIN OperatorLIKE OperatorNow let us create a table to understand the examples of special operators −Emp_IDEmp_NameEmp_SalaryEmp_DeptIDEmp_DeptName1Aaron1000010Technical2Harry1200020Operations3Mary500030Finance4Angel5500010Technical5Will2000030FinanceDep_IDEmp_IDDep_NameDep_Age10012Keith8810023Kim510035Lucy90Details of all the special operators using the above tables are −ALL operatorThe ALL operator compares a value with all the values returned by the subquery and is true only if the given condition is satisfied for all the values. For example −Select * from Employee Where Emp_Salary > ALL (select Emp_Salary from Employee where Emp_DeptID=30);This query returns the details of all the employees whose salary is greater than the salary of ... Read More

Overview of Packages in Oracle

Alex Onsman
Updated on 20-Jun-2020 08:46:22
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
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
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
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
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

Creating a Standard user in SAP HANA system using SQL

SAP Expert
Updated on 21-Feb-2020 08:06:19
This can be created using following SQL query −CREATE USER TEST_122 PASSWORD Pass123$$

Create View SQL in SAP HANA database

SAP ABAP Expert
Updated on 22-Jun-2020 08:52:55
>Create View View_name as Select Col1,Col2 From Table_name;In the above SQL statement, you are creating a view that contains Col1 and Col2 from the table.Table Name − Emp_InfoExampleIdEmplNameEmpluserEmplpasswordJoining_Date1Employee 1Emp1Emp1Pwd9/11/20162 Employee 2Emp2 Emp2Pwd   16/08/20153Employee 3Emp3Emp3Pwd15/09/20164Employee 4Emp4   Emp4Pwd  3/07/20145Employee 5Emp5Emp5Pwd10/09/20126Employee 6Emp6  Emp6Pwd   1/10/2013                                                                                               To create a view, which contains only 3 columns you have to write->Create View View_EmpInfo As Select Id, EmplName,Joining_Date  From Emp_Info;This view can be used by users to get Id, EmplName, and Joining_date. 

Create User SQL in SAP HANA database

SAP ABAP Expert
Updated on 21-Feb-2020 07:52:45
You can achieve this by running the below SQL query −>CREATE USER TEST password “Welcome1$$”  VALID FROM ‘2017-12-05 11:00:00’ UNTIL ‘2018-12-08 12:00:00’; CREATE USER DUMMY password “Welcome1$$”  VALID FROM NOW UNTIL FOREVER;Note that password passed in this SQL should meet password policy of SAP HANA system otherwise user creation will be failed.
Advertisements