About 802,000 results
Open links in new tab
  1. SQL SELECT from multiple tables - Stack Overflow

    How can I get all products from customers1 and customers2 include their customer names? customer1 table cid name1 1 john 2 joe customer2 table cid name2 p1 sandy p2 linda product …

  2. SQL how to compare two tables for same data content?

    How do I write an SQL query to check if TableA and TableB (which have identical primary keys) contain exactly the same values in every column? It means that these two tables have exactly …

  3. sql query to return differences between two tables

    I am trying to compare two tables, SQL Server, to verify some data. I want to return all the rows from both tables where data is either in one or the other. In essence, I want to show all the

  4. SQL query return data from multiple tables - Stack Overflow

    Sep 18, 2012 · Part 1 - Joins and Unions This answer covers: Part 1 Joining two or more tables using an inner join (See the wikipedia entry for additional info) How to use a union query Left …

  5. sql - Combine two tables for one output - Stack Overflow

    Feb 1, 2009 · The only thing that would be possibly faster is to store the data in one table, not two. Use CategoryID = NULL for unknown hours.

  6. SQL select statements with multiple tables - Stack Overflow

    Feb 2, 2014 · Given the following two tables: Person table id (pk) first middle last age Address table id(pk) person_id (fk person.id) street city state zip How do I create an SQL statement that …

  7. SQL Server: compare columns in two tables - Stack Overflow

    Mar 11, 2010 · 11 I've recently done a migration from a really old version of some application to the current version and i faced some problems while migrating databases. I need a query that …

  8. sql - Select count (*) from multiple tables - Stack Overflow

    How can I select count(*) from two different tables (call them tab1 and tab2) having as result: Count_1 Count_2 123 456 I've tried this: select count(*) Count_1 from schema.tab1 union all

  9. SQL: Two select statements in one query - Stack Overflow

    Aug 13, 2015 · I want to select information from two SQL tables within one query, the information is unrelated though, so no potential joints exist. An example could be the following setup. …

  10. SQL how to compare two columns from two different tables

    Mar 6, 2015 · 10 I have two tables, in which table 1 contains 4 columns while table 2 contains 8 columns. I have two columns in table1 that I want to compare them with two columns in table2.