
Creating an HTML Table with SQL
You can create an HTML Table with SQL. You make use of the ‘FOR XML RAW’ and ‘FOR XML PATH’ statements to organize the Table Body (TBODY), Table Header (THEAD)

You can create an HTML Table with SQL. You make use of the ‘FOR XML RAW’ and ‘FOR XML PATH’ statements to organize the Table Body (TBODY), Table Header (THEAD)

The APPROX_COUNT_DISTINCT?SQL Function became available with SQL Server 2019 Community Technical Preview (CTP) 2.0. APPROX_COUNT_DISTINCT?returns the approximate number of unique non-null values in a group. This example returns the approximate

You can ensure that your SQl Server Agent always restarts when the SQL Server restarts by using sp_Configure and xp_cmdshell, as shown underneath: 1. Enabe ‘xp_cmdshell’ — Allow advanced options

ENUMs are very powerful definitions and they help attain data validation when the values are pre-defined. With this you can avoid application-level validation or the same can be extracted from

You can reverse strings in SQL by executing a query similar to this one. This query makes use of the REVERSE SQL function. SELECT FirstName, REVERSE(FirstName) AS Reverse FROM Employees

You can not use the ALTER TABLE statement in SQL Server to rename a column in a table. You can however use the sp_rename stored procedure if you do not

You can generate a Random number in SQL with the following command: SELECT RAND() Random_Number This returns the following value 0.713666525097956

With the ASCII function you can return a certain character’s ASCII value, as shown in the following example: SELECT ASCII(‘A’) AS A, ASCII(‘B’) AS B, ASCII(‘a’) AS a, ASCII(‘b’) AS

The HASHBYTES?function returns the MD2, MD4, MD5, SHA, SHA1, or SHA2 hash of a string. The next example returns a SHA1 hash value of it the string that was input.