drupal 7 join two tables
JOINs are a query-level concept and don't really make a lot sense in the context of a schema definition. 

I suspect what you're asking is how to add a foreign key from your location table to the users table. If so I'm afraid you're out of luck; Drupal does not enforce foreign key relationships, so you'll need to define and maintain your relationships at a code level.

There is a foreign keys property that can be applied to tables defined by the schema API, but it is for documentation purposes only, no foreign keys are ever added at the database level.

Just in case you are asking how to join a table in a query:

$query = db_select('location', 'l')
  -&gt;fields('l');

$query-&gt;join('users', 'u', 'u.uid = l.uid_column_name');

$results = $query-&gt;execute();