How to find second highest value in table ?

 How to find second highest value in table ?  SQL Server  Find the highest employee salary    SELECT EmpId, SalaryFROM(Select EmpId, Salary, ROW_NUMBER() OVER(ORDER BY Salary Desc) AS Salary_OrderFROM   Employee) resultsWHERE results. Salary_Order = 1 ; Find the 2nd highest employee salary    SELECT EmpId, SalaryFROM(Select EmpId, Salary, ROW_NUMBER() OVER(ORDER BY Salary Desc) AS Salary_OrderFROM Continue reading “How to find second highest value in table ?”

What’s new in SQL Server 2017 ?

What’s new in SQL Server 2017 SQL Server 2017 represents a major step towards making SQL Server a platform that gives you choices of development languages, data types, on-premises or cloud, and operating systems by bringing the power of SQL Server to Linux, Linux-based Docker containers, and Windows. This topic summarizes what is new forContinue reading “What’s new in SQL Server 2017 ?”

How to find first and last occurrence of any char or word in sql query?

How to find first and last occurrence of any char or word in sql query?  Find First occurrence of any character or word in the string : In the given below example, we need to search for the first occurrence of word ‘the’ in the sentence. DECLARE @String AS VARCHAR(100) DECLARE @strSearch AS VARCHAR(100) SET @String =’Hi SQL SERVER is fromContinue reading “How to find first and last occurrence of any char or word in sql query?”

How to delete SQL Server Instance ?

How to delete SQL Server Instance ? To uninstall an instance of SQL Server 2008 R2 To begin the uninstall process, from the Start menu, click Control Panel, and then double-click Add or Remove Programs. Select the SQL Server component to uninstall, and then click Change/Remove. This starts the SQL Server Installation Wizard. Setup Support Rules runs to verify your computer configuration. ToContinue reading “How to delete SQL Server Instance ?”

Where to find SQL Server Management Studio Icons?

SQL Server Management Studio Shortcut Icons SQL Server 2014  C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Ssms.exe SQL Server 2012 C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\Ssms.exe  SQL Server 2008 R2   C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe  older SQL Server 2005  C:\Program Files\Microsoft SQL Server\90\Tools\Binn\VSShell\Common7\IDE\SqlWb.exe

SQL Server Instance Connection Error

SQL Server Instance Connection Error  ERROR  A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 – The remote computer refusedContinue reading “SQL Server Instance Connection Error”

Design a site like this with WordPress.com
Get started