- Technology, mobile, photography, gaming, programming, anything -

Hmm… I have been using SQL for quite some time. But I do not know how to compare 2 tables to find out the different records. For example, I have 2 tables which are table A and table B. Both of them have some similar records. But I want to filter out the different data only. How can I do so? I searched online and discovered the method to do so. It is located in Microsoft SQL Server 2005 Books Online. All we need to do is use EXCEPT function in SQL.

Query to compare 2 tables to find the different


Query to compare 2 tables to find the matches


Hope this will help you too. ;)

How to modify Windows System Registry Values with C#? As usual, you need to use Microsoft.Win32 Namespace ~ using Microsoft.Win32;. Let’s take Windows Application Event Logs values as an example. I want to change the MaxSize and Retention values in Application Event Log file by using C#.

Codes to change Windows System Registry values

RegistryKey TestEventLog = Registry.LocalMachine.OpenSubKey(“System\\CurrentControlSet\\Services\\EventLog\\Application”,true);
TestEventLog.SetValue(“MaxSize”, “102367232″, RegistryValueKind.DWord);
TestEventLog.SetValue(“Retention”, “0″, RegistryValueKind.DWord);

Above codes open Application event log and with write permission (,true). It changes both MaxSize and Retention values.
Just change the codes to suit your need. ;)

How to read and write Windows System Registry Keys and Values? I need to create a value at Windows System Registry for my project lately. It is used for SCOM discovery. I need a Windows System Registry key to determine that the server is the server that SCOM going to monitor.

First thing to do in your C#. Add using Microsoft.Win32; RegistryKey and Registry requires Microsoft.Win32 as the assembly reference.

Here are the codes that write Windows System Registry Keys.

RegistryKey JayceOoiKey = Registry.LocalMachine.CreateSubKey(“SOFTWARE\\JayceOoi”);

This will create key JayceOoi under HKEY_LOCAL_MACHINE\SOFTWARE\.

To read Test string value from HKEY_LOCAL_MACHINE\SOFTWARE\JayceOoi\

string Output = JayceOoiKey.GetValue(“Test”);

These are the methods that I use to read and write Windows System Registry Keys and Values. Hope it will help in your programming work. ;)

Featured ...

Slicepad Pocket Projector Review
64GB SanDisk Extreme microSDXC UHS-I Card Review
64GB Samsung microSDXC Pro UHS-1 Card Review

Guide for ...

Samsung Galaxy Note 3
Google Nexus 7 (2013)
Samsung Galaxy S4
Google Nexus 4
Samsung Galaxy Note 2
Google Nexus 7
Samsung Galaxy S3
Amazon Kindle Fire
Samsung Galaxy S2

Follow ...