|
|
-
|
|
The below scripts will help us to determine the list of columns present in a table , their datatype and size along with whether it is identity/computed or not
Solution 1
Select
[Table Name] = so.name
,[Column Names] = sc.name
,[Data Type] = st.name
,[Size] = sc.length
,[Is Id......
|
|
-
|
|
It is often a requirement to split a set of contiguous string into individual characters/letters. The below code will help us to do so
Declare @str Varchar(50) = 'abcde'
Select
Data = Substring(@str,Number,1)
From master.dbo.spt_values
where Number Between 1 And Len(@str)
An......
|
|
-
|
|
Interfacing C# application (basic CRUD using functions) with PostgreSQL(9.1.0-1) and NpgSql(2.0.11.91) as .Net data provider - Part 2
PostgreSQL does not support the traditional way of creating stored procedure found in other databases like Sql Server, Oracle etc. It lacks the famous Create Procedu......
|
|
-
|
|
In this article we will look into how to interface C# application with PostgreSQL(9.1.0-1) and PgAdmin III(1.14.0) which was release on Sept 9, 2011.This powerful RDBMS is there for a long time and it is free also which indicates that we will not have any licensing issue if we use it in our commerci......
|
|
-
|
|
Purpose: It is a dummy table in Oracle with one row and one Varchar2 column whose length is 1.
It's structure looks as under
SQL> Desc Dual;
Name Null? Type
----------------------------------------- -------- -------------
DUMMY ......
|
|
-
|
|
Today we will look into the famous problem of "Finding the Second highest salary of Employees for each department"
Well, this question has already been asked in PLSQL Challenge 2 and henceforth we are not going to discuss about the introduction of the same here
Sample Data
EmployeeID EmployeeN......
|
|
-
|
|
Postgre SQL has a rich set of mathametical function and operators. Here is a list of some of the Mathematical functions with their equivalent counter part in SQL Server
Yesterday we have looked into the Mathematical operators
1.ABS
Purpose:Returns absolute value
Example in PostgreSQL
Select Abs......
|
|
-
|
|
Postgre SQL has a rich set of mathametical function and operators. Here is a list of some of the Mathematical operators with their equivalent counter part in SQL Server
Tomorrow we will look into the Mathematical functions
1.Basic Arithmetic Operators
Purpose:Does arithmetic operations.
......
|
|
-
|
|
Array_To_String function in PostgreSQL
Purpose: This functions concatenates an array element to a string provided the join string is supplied. It returns a string. It is exact opposite of String_To_Array
Syntax:Array_To_String(Array,join string)
Simple Example
Select Array_To_String(ARRAY['......
|
|
-
|
|
String_To_Array function in PostgreSQL
Purpose: This functions splits a string to an array provided the delimeter is supplied. It returns an array.
Syntax:String_To_Array(String,delimeter)
Simple Example
Select String_To_Array('Hello World Today I am learning String_To_Array It is very cool','......
|
|