The EXCEPT operator returns all of the distinct rows from the query to the left of the EXCEPT operator when there are no matching rows in the right query. The EXCEPT operator is equivalent of the Left Anti Semi Join. EXCEPT operator works the same way NOT IN. EXCEPTS returns any distinct values from the query to the left of the EXCEPT operand that do not also return from the right query.
SQL SERVER – Top 15 free SQL Injection Scanners – Link to Security Hacks
SQL injection is a technique for exploiting web applications that use client-supplied data in SQL queries, but without first stripping potentially harmful characters. Checking for SQL Injection vulnerabilities involves auditing your web applications and the best way to do it is by using automated SQL Injection Scanners. Security-Hacks.com compiled a…
Read MoreSQL SERVER – 2005 Build List Link
What is Build List? All SQL Server has build list, this is incremental list of numbers which indicates which version SQL Server is running and what are its compatibility, patches etc. Regular Columnist Steve Jones of SQL Server Central has created build list. It is updated and informative. Microsoft Hot…
Read MoreSQL SERVER – SQL Code Formatting Tools
SQL Code Formatting is very important. Every SQL Server DBA has its own preference about formatting. I like to format all keywords to uppercase. Following are two online tools, which formats SQL Code very good. I tested following script with those tools and I found two of the tools worth mentioning here.
SQL SERVER – Script/Function to Find Last Day of Month
Following query will find the last day of the month. Query also take care of Leap Year. Script: DECLARE @date DATETIME SET @date='2008-02-03' SELECT DATEADD(dd, -DAY(DATEADD(m,1,@date)), DATEADD(m,1,@date)) AS LastDayOfMonth GO DECLARE @date DATETIME SET @date='2007-02-03' SELECT DATEADD(dd, -DAY(DATEADD(m,1,@date)), DATEADD(m,1,@date)) AS LastDayOfMonth GO ResultSet: LastDayOfMonth ----------------------- 2008-02-29 00:00:00.000 (1 row(s) affected)…
Read MoreSQL SERVER – ASCII to Decimal and Decimal to ASCII Conversion
In this blog post we will see how we can convert ASCII to Decimal and Decimal to ASCII. In simple words, we will see the decimal and ASCII conversion.