Posts

Select Top Records In SQL Part IV

Image
Select Top Records In SQL Select Top : The SELECT TOP clause is used to specify the number of records to return.  The SELECT TOP clause is useful on large tables with thousands of records, returning a large number of records can impact performance. Create a New Table for Solving the following Query : Table : tblCustomer 1) Finding the First Highest Sales in tblCustomer ? 2) Finding the Second Highest Sales in tblCustomer ? 3) Finding the Third Highest Sales in tblCustomer ? 4) Finding the Fourth Highest Sales in tblCustomer ?        

Concept Of SQL Server Part III

Image
Concept Of SQL Server Union : Union is used to combine data of one or more tables. Union only distinct values are allowed. The following SQL statement returns the Id, FirstName, LastName (only distinct values) from both the " tblCustomer " and the " tblCustomerExpired " table : Two Table : tblCustomer tblCustomerExpired Example : Union all : Union all is used to combine data of one or more tables. Union all duplicates values are allowed. The following SQL statement returns the Id, FirstName, LastName (duplicate values also)from both the "tblCustomer" and the "tblCustomerExpired" table : Two Table : tblCustomer tblCustomerExpired Example : Group By Clause : Group by clause is used to combines the groups rows that have the same values into rows. The Group By clause is used with aggregate functions (COUNT(), MAX...

Understanding Questions For SQL Server & SQL Server Management Studio Part II

Image
Understanding Questions For SQL Server & SQL Server Management Studio What is a Primary Key in SQL Server ? Primary Key : A primary key is a field in a table which uniquely identifies each row/record in a database table.  Primary keys must contain unique values. Explain What is a Identity Column ? Identity column of a table is a column whose value increases automatically.  The value in an identity column is created by the server.  A user generally cannot insert a value into an identity column. Identity column can be used to uniquely identify the rows in the table. How can I create One to Many relationship ? In a one-to-many relationship, one record in a table can be associated with one or more records in another table. How can I create Primary Key & Foreign Key relationship ? In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the col...

Learn SQL Server Management Studio (SSMS)

Image
Learn SQL Server Management Studio (SSMS) What is SQL Server Management Studio  ( SSMS ) ? SQL Server Management Studio : SQL Server Management Studio (SSMS) is a software application first launched with  Microsoft SQL Server 2005   that is used for configuring, managing, and administering all components within Microsoft SQL Server. Microsoft SQL Server Management Studio (SSMS) is an integrated environment to manage a SQL Server infrastructure. How to Download and Install SQL Server Management Studio ( SSMS ) : We can use the following steps to download and install Microsoft SQL Server Management Studio ( SSMS ) in the Windows system : Step 1 : Go to the clicking on this link and click on Download SQL Server Management Studio 18.08. Step 2 : Once the file has been downloaded, it will be named "SSMS-Setup-ENU.exe." Now, double-click on it to continue. Step 3 : Here, we can change the installation location and then click t...