You have a table and want to see only rows that satisfy a specific condition.

Use the WHERE clause to specify which rows to keep. For example, to view all employees assigned to department number 10:

1 select *
2   from emp
3  where deptno = 10

The WHERE clause allows you to retrieve only rows you are interested in. If the expression in the WHERE clause is true for any row, then that row is returned.

Most vendors support common operators such as: =, <, >, <=, >=, !, <>. Additionally, you may want rows that satisfy multiple conditions; this can be done by specifying AND, OR, and parenthesis .


You have a table and want to see all of the data in it.

Use the special “*” character and issue a SELECT against the table:

1 select *
2 from emp

The character “*” has special meaning in SQL. Using it will return every column for the table specified. Since there is no WHERE clause specified, every row will be returned as well. The alternative would be to list each column individually:

select empno,ename,job,sal,mgr,hiredate,comm,deptno
from emp
In ad hoc queries that you execute interactively, it’s easier to use SELECT *. However, when writing program code it’s better to specify each column individually. The performance will be the same, but by being explicit you will always know what columns you are returning from the query. Likewise, such queries are easier to understand by people other than yourself (who may or may not know all the columns in the tables in the query).

Discovering Islam…

17 October, 2006




[Akbar Ahmed : The Ibn Khaldun Chair of Islamic Studies and Professor
of International Relations, American University, Washington, D.C.]


The images of Islam prevalent in the world are of brutality, fanaticism, hatred and disorder: Libyans killing policewomen in London, Palestinians hijacking passenger planes, Iranians seizing foreign embassies and Indonesians blowing up the Borobudur temple in Java. The very names of the Muslim leaders of our times—Khomeini, Gaddafi, Arafat—have become symbols of these images. It is V.S.Naipaul’s vision of Islam and Muslims (Among the Believers: An Islamic Journey, 1981): ‘Rage was what I saw…Muslims crazed by their confused faith.’


These images stem partly from a lack of understanding of Islam among non-Muslims and partly from the failure by Muslims to explain themselves. The results are predictable: the hatred feeds on hatred. I saw ‘kill a Muslim for Christmas’ written in the London underground stations. Following a nuclear holocaust, American science fiction writer Robert Heinlein has the white survivors enslaved, men castrated and baby girls eaten by Black Muslims, neatly fusing religious and racial prejudices (Farnham’s Freehold, first published in the 1960s). The Muslim leaders, hated and despised, are reduced to Walt Disney villains: ‘Kho Maniac, Wacky Kaddafi, Yucky Arafat’ (‘Garbage pail adults’, MAD, back cover, September 1986). The repugnance is contagious. Even the staid London Economist is not immune and panders to the stereotype: ImamKhomeini was ‘Savonarola’ and Colonel Gaddafi ‘the Devil’s godfather’ on its covers. The colours, red and black, were striking and indicated hell; both men appeared minatory and forbidding.

Read the rest of this entry »

If you forget a password for your user on your Windows system (especially if the user is administrator), your computer immediately becomes a paperweight. It’s like being locked out of your car without a spare set of keys and without a way to contact a locksmith. Use Knoppix as your locksmith to reset the password to a new value or even completely erase it.

User accounts have an interesting history in Windows. The Windows 9x series did offer usernames and passwords, but every user could overwrite every other user’s files, and the system did not offer any real security. If you forget your password in Windows 9x, resetting it is as simple as deleting a .pwd file with a DOS disk. With Windows NT, 2000, and XP, Microsoft has increased its user security by creating different user accounts on the same system and passwords that protect them. However, unlike in Windows 9x, if you forget your Administrator password, your only recourse is to purchase a tool to reset your Windows password or to reinstall Windows to create a new administrator account. If you have a Knoppix disc, you can download and use the chntpw tool, which is a small program that lets you reset the local passwords on a Windows system, and return to your system.

Get chntpw

The chntpw tool is part of the ntpasswd package, which can be downloaded in boot floppy form from its web site at However, this gives you a floppy image and requires that you mount multiple loopback entries to extract the utility from the floppy image to use under Knoppix. While you can simply create an ntpasswd boot floppy, this means yet another rescue disk to carry with you, and the beauty of Knoppix is that you have access to all of your recovery tools in a single disc. Luckily, the chntpw tool is now part of Debian unstable, which means that you can grab it directly from Debian’s repository.


You could use the apt-get wrapper, which is included for Knoppix, to download chntpw. However, to be certain you retrieve the latest version of chntpw, you must run the apt-get update, which downloads about 10 times as much data per repository as the 85-KB chntpw package. It saves bandwidth and time to download the package directly.

Read the rest of this entry »

One thing that has been missing from Knoppix (and Linux in general) is the ability to safely write to NTFS partitions. Now with Knoppix 3.4, you can edit, delete, and move files on your NTFS partition—jobs that are difficult with the Windows Recovery CD!

While the Linux kernel has been able to read NTFS partitions for some time, writing to them has always been considered very dangerous. The NTFS spec is a closed spec that requires kernel hackers to reverse engineer it to make a driver that supports it. However, this can be very problematic: if a programmer reverse engineers NTFS 3.0, she must repeat the process when NTFS 4.0 is released. Writing to NTFS has been so dangerous that instead of just warning users, some kernels go as far as disabling write support in the NTFS driver itself. Recently, a solution to write to NTFS partitions has appeared with Captive NTFS. This solution actually uses the NTFS drivers that Windows itself uses, and is included in Knoppix 3.4.


Captive NTFS is still somewhat experimental, and while it has worked for many people, there is a chance for data loss, so be sure to back up any important files on filesystems you mount this way.

Configure Captive NTFS

The Knoppix Captive NTFS wizard makes it easy to configure and use the Captive NTFS system. When you run the wizard, it scans all the drives on your computer for the Microsoft-provided NTFS drivers it needs to safely write to your NTFS filesystems. Click K Menu|KNOPPIXUtilities|Captive NTFS to launch the program. The wizard that appears automates the process of finding and using the NTFS .dlls. Click Forward to see a listing of the system files that Captive NTFS has already found on your Knoppix system. Click Forward again, and the wizard mounts and scans your hard drives for the essential files it needs.

Read the rest of this entry »