2019/08/30
In this article, you can learn how to do group concatenation in SQL Server. Group concatenation means concatenating values within each group defined by GROUP BY clause. Here a list of strings to be combined and places a separator between them.
Consider the following table:
CREATE TABLE EMPLOYEE(ENAME VARCHAR(45),DEPT VARCHAR(45))
INSERT INTO...
2019/08/27
DATEPART Function - SQL Server Date Time Functions
Date Time Functions, DATEPART function, SQL Development, T-SQL No comments
DATEPART function returns an integer that represents the specified datepart of the specified date. This is very similar to DATENAME. This function returns an integer value. The return value depends on the language environment set by using "SET LANGUAGE". DATEPART function can be used in the SELECT list, WHERE, GROUP BY, HAVING, ORDER BY.
Syntax
DATEPART...
DATENAME Function - SQL Server Date Time Functions
Date Time Functions, DATENAME Function, SQL Development, T-SQL No comments
DATENAME function returns a character string representing the specified datepart of the specified date. This function returns a nvarchar value. The return value depends on the language environment set by using "SET LANGUAGE". DATENAME function can be used in the SELECT list, WHERE, GROUP BY, HAVING, ORDER BY.
Syntax
DATENAME ( datepart,...
2019/08/26
Get Column or parameter properties with COLUMNPROPERTY function - SQL Server
COLUMNPROPERTY function, Meta Data Functions, MSSQL, SQL Development, T-SQL No comments
Overview
COLUMNPROPERTY function returns the property information about the column or parameter. This function returns an integer value. It returns 1 for true, 0 for false, NULL for invalid input/value, and -1 for XML or large value types for the precision property.
Catalog Views and Information_schema objects are...
2019/08/24
Split comma separated string in a column / string to rows and convert into columns in SQL Server
CHARINDEX, cross apply, CTE, Dynamic SQL, Interview Questions, SQL Development, T-SQL No comments
This article is about how to split comma separated string value in a column or string variable value into multiple columns in SQL Server. Here delimiter can be any special character such as comma (,), hash (#), dollar ($), etc.,.
Split comma...
2019/08/21
Default ports used by SQL Server Services
Administration, Firewall, MSSQL, Security, SQL Server default ports No comments
Firewall systems help prevent unauthorized access to computer resources. If a firewall is turned on but not correctly configured, connections to SQL Server instances and related services will be blocked. So database administrators need to ensure that firewalls are properly configured to allow inbound and outbound traffic to the SQL Server instance.
Below...
2019/08/15
SQL Server 2017 Graph Databases ( Overview, Uses, Example )
edge tables, graph, graph database, match clause, MSSQL, node tables, SQL Development, sql server 2017, T-SQL No comments
Overview
Graph database is introduced in SQL Server 2017 version and it is a collection of Nodes and Edges. Both the relational and graph databases are data management system software. In Graph database building blocks are Nodes and Edges whereas in relational database building blocks are table...
2019/08/13
SQL Server Window Function - ROW_NUMBER() usage and examples
MSSQL, Over clause, Ranking Functions, ROW_NUMBER, SQL Development, T-SQL, Window Functions No comments
Overview
ROW_NUMBER function returns a unique integer value starting with one and incremented by one for every row.
The ROW_NUMBER function enumerates the rows in the sort order defined in the OVER clause.
An ORDER BY expression inside the...