If you have a table as follows:
Field1 | Field2 | Field3 |
---|---|---|
John | 2011-10-01 | G |
John | 2011-10-01 | G |
John | 2011-10-01 | G |
George | 2011-01-02 | B |
Klaus | 2001-01-01 | B |
and you would like to remove all duplicate rows, the easiest method is to create an unique index like so:
Suppose you have a table as follow:
Name | Id |
---|---|
John | |
Peter | |
George |
and you want to update the Id field with a sequential rank 1,2,3,4,... In MySQL this is a way to do so:
I struggled for 2 hours with a Windows 2008 SP 2 machine that refused to do anything other than presenting an 80072efd error when asked to perform a Windows Update check. It worked two months ago. Nothing has changed to the best of my knowledge. I tried all the MS KB's. Nothing helped.
So when I merely changed Update Frequency to Install Updates Automatically and checked again, it suddenly started working. WTF?
PS: Seems like this was just a fluke. The real problem was that even though I removed the old (invalid) proxy server definition from IE, it still lingered in
Sometimes I need to fiddle with a registry setting normally under HKEYCURRENTUSER, but that points to your own hive. When you need to change another user's registry whilst being logged in on a terminal server, you cannot load the hive file ntuser.dat as it is already loaded. For that issue the following command in cmd.exe:
wmic useraccount get name,sid
Then use the SID to locate the user's hive under HKEY_USERS.