Select rows containing identical values in two columns

2007-11-16 Thread Stephen P. Fracek Jr.
I have a table that has a column with the id of the person that  
created the row.  In another column in the same row there is a column  
with the id of the person that modified that row.


Is there a way to write a SELECT statement that will return all the  
rows where the value in the creation column equals the value in the  
modification column?  I don't want to specify a specific id in either  
of the columns.


TIA

Stephen P. Fracek, Jr.
[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Select rows containing identical values in two columns

2007-11-16 Thread Philip Hallstrom
I have a table that has a column with the id of the person that created the 
row.  In another column in the same row there is a column with the id of the 
person that modified that row.


Is there a way to write a SELECT statement that will return all the rows 
where the value in the creation column equals the value in the modification 
column?  I don't want to specify a specific id in either of the columns.


SELECT * FROM your_table WHERE created_by_id = updated_by_id;

?

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]