Fetch the employee having no address?

I am new to database programming.

I have a database structure here.

http://www.sqlfiddle.com/#!4/b1174

I want to Fetch all the employee having no address.

It should fetch employee with id as 3.

How i can do this?

Answers


This query should do

select * from emp where id not in(select distinct(id) from address);

    select * from emp as e
left join address as a on e.id=a.id
where a.id is null

Need Your Help

Unable to extend a simple form with django-registration (NotImplementedError at /accounts/register/)

python django django-forms django-registration

I'm trying to use django-registration in my project, and I have to add two extra fields in registration form. My django version is 1.6.2 and python 2.7.

enter term into hidden form field with html and css possible?

html css forms

I have created a form in HTML/CSS on my website.