How to send a SQL Server query results in e-mail message
How to send a SQL Server Query result in e-mail message?
If we have configured SQL Server Database Mail then we can easily send query result as an attachment in mail body.
![]()
SQL Server Tutorials By Pradeep Raturi- This website provides a SQL server, SSRS, Power BI, Python, Azure basics and advanced tutorials for beginners and professionals .You will find out a step-by-step
Troubleshooting Database Mail
If you are not getting Database Mail after configuring it , you need to got through few more step to fix it.
![]()
In SQL Server we can create a database, table and write T-SQL query using emoji.
Here we will create a table and then insert few records into table.
![]()
In SQL Server there are new Dynamic Management Functions that is used to keep track of Object Dependencies sys.dm_sql_referenced_entities and sys.dm_sql_referencing_entities.
![]()
A synonym is a database object that allows an alternative name for another database object, referred to as the base object, that can exist on a local or remote server.
![]()
How to Find out Identity Column Without Using Column Name ?
![]()
SQL Server REVERSE Function is a string function that returns the reverse order of a string value. It returns a value of type varchar or nvarchar .
![]()
SQL Server IDENTITY_INSERT allows explicit values to be inserted into the identity column of a table.
The IDENTITY_INSERT statement must be set ON to insert explicit value for identity column. By default IDENTITY_INSERT is OFF.
![]()
SQL Server SET DATEFORMAT is used to set the order of the month, day, and year date parts for interpreting date character strings.
![]()
SQL Server SET XACT_ABORT controls the atomicity of any user defined transaction.
![]()
SQL Server ISNULL() Function is a system function that returns the specified value if the expression is NULL else it returns the expression.
![]()
SQL Server @@ERROR is a global variable that returns an error number if the last statement encountered an error but we have to trace it within just after the next line where the actual error occurred, otherwise, it will reset to 0.
![]()
SQL Server @@IDENTITY function is a system function that is used to get the last IDENTITY value generated for any table with an identity column under the current session, regardless of the scope of the T-SQL statement that generated the value.
![]()
A Recursive CTE (Common Table Expression) is a CTE that references itself. In doing so, the initial CTE is repeatedly executed, returning subsets of data, until it returns the complete result set.
![]()
SQL Server STRING_SPLIT function is used to split a string into a table that consists of rows of substrings based on a specified separator. This function was introduced in SQL Server 2016 .
STRING_SPLIT requires the compatibility level to be at least 130. When the level is less than 130, SQL Server is unable to find the STRING_SPLIT function.
![]()
SQL Server ISNUMERIC( ) function is System Functions which is used to check if the expression is valid numeric type or not.
![]()
A computed column is a virtual column which is used to add a new column to a table with the value derived from the values of other columns in the same table.
Computed column is not physically stored in the table, unless column is marked PERSISTED and it is persisted only if its expression is deterministic.
![]()
How to create a custom shortcuts for stored procedures in SQL Server ?
![]()
SQL GROUPING SETS allows computing multiple GROUP BY clauses in a single statement. The results of GROUPING SETS are the equivalent of UNION ALL of the specified groups.
![]()
SQL Server Tutorials By Pradeep Raturi : SQL Server CHOOSE Functions is the logical function that returns the item at the specified index from a list of values in SQL Server.
![]()