SQL JOINS — INNER,OUTER( FULL,LEFT,Right) ,CROSS, SELF — Parv The IT Geek

Have you ever been baffled when people talk about SQL joins? Mystified when you hear inner, outer, cross or self? Ran away in fear at the thought of joining two tables? Well I am about to help you out and face down those fears and explain to you what joins are, the different types andContinue reading “SQL JOINS — INNER,OUTER( FULL,LEFT,Right) ,CROSS, SELF — Parv The IT Geek”

How to list all SQL DMVs (Dynamic management views) s and DMFs (Dynamic management functions ) in…

Have you ever wondered how many DMVs are in SQL? Wondered whether a DMV exists which help diagnose your problems? Well I am going to show you how to list all the DMVs and DMFs so that you can do a deeper dive into them or await my series where I will be exploring eachContinue reading “How to list all SQL DMVs (Dynamic management views) s and DMFs (Dynamic management functions ) in…”

Use SQL to search a column for a range of values — Parv The IT Geek

Have you ever wanted to search for a column for a range of values? For example if you were searching for Product ID which ranges from 1 to 300, or look for a range of names starting A to D. Well I can show you how to do these quickly and easily by using theContinue reading “Use SQL to search a column for a range of values — Parv The IT Geek”

Search for a list of values using the IN command in SQL — Parv The IT Geek

Have you ever been presented with a list of values which need to be found in a column or wondered how to search for a list of exact names, addresses, numbers without using wildcard searches or ranges. Well SQL has the answer and it is the IN command. USE AdventureWorks GO SELECT * FROM HumanResources.DepartmentContinue reading “Search for a list of values using the IN command in SQL — Parv The IT Geek”

NULL Values — How to filter out NULLS and how to find NULLS using SQL — Parv The IT Geek

Well SQL has the solution and our saviour is the ‘IS NULL’ and ‘IS NOT NULL’ commands. Using them in a ‘WHERE’ clause will allow us to do the filtering out appropriately. USE AdventureWorks GO SELECT COUNT(*) FROM [AdventureWorks].[Person].[Address] The above query bring us a result of 19,614 rows contained within the AddressLine2 where noContinue reading “NULL Values — How to filter out NULLS and how to find NULLS using SQL — Parv The IT Geek”

How to order results in SQL? ORDER BY — Parv The IT Geek

A basic query of the HumanResources.Department table bring s the following results. If you wanted to reverse the order of the DepartmentID then you would need to user the ‘ORDER BY’ clause. The default sort is always ascending ( ASC) but it does not have to be explicitly written. If you want the order toContinue reading “How to order results in SQL? ORDER BY — Parv The IT Geek”

How can I find out what SQL Server version is running? — Parv The IT Geek

I was asked by someone which SQL Server version a server was running and was surprised when my DBA colleague said to run a stored procedure I had never heard of. I had not thought that there would be more than one way as the usual method I used below was so simple I didn’tContinue reading “How can I find out what SQL Server version is running? — Parv The IT Geek”

What is Denormalization? — Parv The IT Geek

This is simply the process of combining smaller tables to make larger tables. This can be used to address problems with performance or scalability. This is usually caused by tables being stored in separate files on disks and when databases are being queried there is a requirement for each several files to be accessed accordingContinue reading “What is Denormalization? — Parv The IT Geek”

What is Normalization? — Parv The IT Geek

I would simply describe this as the process of making big tables into smaller tables. The proper definition is that database normalization is a method of reorganising data within tables to reduce the level of dependency. This helps to isolate data so that insertion, deletions and updates in a field can be made into aContinue reading “What is Normalization? — Parv The IT Geek”

What is CRUD (Create, read, update and delete ) — Parv The IT Geek

CRUD is used to describe the majority of commands which are used within databases. Some database professionals I know have used the term BREAD instead which stands for for “Browse, Read, Edit, Add, Delete”. Create Basically this means adding something new This can be used to add new data or objects…. Read This means toContinue reading “What is CRUD (Create, read, update and delete ) — Parv The IT Geek”