Query Help, Comparing Rows
Suppose I have the following data:
+----+----------+-----+-----+-----+-----+-----+-----+-----+
| Id | Time | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
+----+----------+-----+-----+-----+-----+-----+-----+-----+
| 11 | 11:20:00 | F | T | T | T | F | F | F |
| 12 | 11:45:00 | F | T | T | T | F | F | F |
| 14 | 12:10:00 | F | T | T | T | F | F | F |
| 15 | 12:35:00 | F | T | T | T | T | T | F |
| 17 | 13:00:00 | F | T | T | T | T | T | T |
| 18 | 13:25:00 | F | T | T | T | T | T | T |
| 19 | 13:50:00 | F | T | T | T | T | T | T |
| 20 | 11:28:00 | F | T | T | T | T | T | F |
| 21 | 11:53:00 | F | T | T | T | T | T | F |
| 22 | 12:18:00 | F | T | T | T | T | T | F |
+----+----------+-----+-----+-----+-----+-----+-----+-----+
I would like to output the data by day pattern. I need some way to determine that in the above table, Mon-Wed is the same, Thu-Fri is the same and Saturday and Sunday are unique.
View Complete Forum Thread with Replies
Related Forum Messages:
Comparing Successive Rows
I'm having a table with the following (simplified) columns: id (AUTO_INCREMENT), computer_id(INT), time (INT). Every few seconds different computers are inserting a row with time being the time when this happened. Now I would like to generate a statistic that shows per computer when it happened that two insert operations were more than x seconds apart. This way I can e.g. see when a computer has had a little too much lag time. If I only have one computer in my table this is quite straight forward: SELECT t2.time-t1.time, FROM mytable t1 INNER JOIN mytable t2 ON t1.id=t2.id-1 AND t1.time<t2.time-x; This quiery is based on the assumption that the IDs of two following entries from a computer are in order and e.g. 2 and 3 or 9 and 10. If however I have a few computers in the table the IDs for one computer aren't following each other anymore and could be 9, 17, 22, 23, 31 ... I read something about have a sort of "on-the-fly" incremental id per computer using a variable: SET @counter=0;SET @counter2=0; SELECT t2.time-t1.time FROM (SELECT @counter:=@counter+1 as counter, time FROM mytable WHERE computer_id=1) AS t1 INNER JOIN (SELECT @counter2:=@counter2+1 as counter, time from mytable WHERE computer_id=1) AS t2 ON t1.counter=t2.counter-1 and t1.time<t2.time-x; The sad news is that this query never returns, at least I didn't see it return. Generally I would say that having two sub-queries in there isn't the best thing to do, but I didn't know how to do it. I'm sure there is a way to do this without having a single table for each computer, but I just can't figure out how to do this. Anybody with an idea?
View Replies !
Comparing Two Tables And Delete Rows
I have two tables pluserdata and pluserlids. pluserdata contains all the users information such as ID username password email etc, and pluserlids contains just corresonding IDs (from pluserdata) and then leagueid which correspods to another table. What I am after is a query to look at pluserlids and then delete any rows that do not have a corresonding id in pluserdata. Another way of explaining it is that I have deleted about 1000 users (spam) from pluserdata but their ids are still in the pluserlids table so I want to check to see if they have been deleted then to remove their lid from pluserlids.
View Replies !
Comparing Two Tables :: Find Missing Rows
I have to compare two tables. They are both of more than 650.000 rows, and I have to find which ones are missing in one of them. I have tried to first find all the rows in table A, and then search through table B to see if you can find it there. But this takes way to long time. Too bad mysql4 does not take subqueries. Does anyone out there have a good idea to get this done?
View Replies !
Comparing Dates Y, M, D , Time In Sql Query
ok.. ive finally got my nice little calender setup to output my dates now how do i query my database for example ive got 2 variables $startdate = 2006-1-1 00:00:01 $enddate = 2006-1-1 23:59:59 these represent the 1st and last second of the first of january 2006 i have a cell in my table (table called challenges) ( cell called time) that contains a date in the same format for each entry how do i get all the entries between the start time and the end time.. can i use less than < and more than > as these are not really integar values the column type is datetime but there is also another column of type datetime
View Replies !
Zero Rows Or One Rows Returned, Same Data And Same Query
I have a query that produces a single row (as I expect) when I run it from the mysql client (mysql 4.0.18-Max/linux, also 5.0.19-standard/OSX-intel), or from sqlgrinder (osx, uses jdbc). When I run it inside my application (a Java app connecting via jdbc), I get zero rows from this query. I tried it under phpmyadmin, and once again I get zero rows. Why do I get inconsistent results? Here's the query:
View Replies !
Last N Rows Of The Query
SELECT expensive query ORDER BY field ASC; It generates somewhere around 2.9m rows. I want the last 10: SELECT expensive query ORDER BY field DESC LIMIT 10 But I want them the other way around. Sure, I can do that programatically, but for "application reasons" I want that done in the query, so what I want to do is along the grounds of SELECT expensive query ORDER BY field LIMIT 10 OFFSET rows()-10 We're using MySQL 4.0. Is there a way to achieve the above without using a temporary table?
View Replies !
Several Rows From One Query
I've this sql-query... $sql = "INSERT INTO database (some_kind_of_id, names) VALUES $xxx, $_POST['xxx2']"; The thing is that my post xxx2 are several values that I want inserted on several rows with the values xxx in front...
View Replies !
Eliminate Rows In A Query (without Many OR)
This is my query : SELECT cas.id,cas.noCas,cas.nomFictif,cas.prenom,cas.naissance FROM cas WHERE LEFT(noCas, 3)<'300' AND cas.id<>53 AND cas.id<>61 AND cas.id<>173 AND cas.id<>174 AND cas.id<>178 AND cas.id<>185 AND cas.id<>598 ORDER BY noCas There must be a more efficeint way to find what i want than this : AND cas.id<>53 AND cas.id<>61 AND cas.id<>173 AND cas.id<>174 AND cas.id<>178 AND cas.id<>185 AND cas.id<>598 Something like cas.id is not (list of values)...
View Replies !
How Many Rows Were Affected By Query?
How do I retrieve the number of affected rows by an UPDATE query with SQL? The C API exposes mysql_affected_rows() but I can't find documentation of the SQL equivalent... I'm trying to find if an UPDATE had an effect within a stored procedure, so I can do an INSERT if there's no row to update. Doing it the other direction to generate an error to act on would be quite wasteful... one INSERT and millions of errors per day.
View Replies !
SQL Query Not Outputing All Rows.
My query doesn't seem to output all 6 rows in the database only two queries and i'm unsure why. I do know it is the query as when i do SELECT * FROM case_studies It outputs all rows. The query i am usign is: select programs.program_title, programs.id, case_studies.id, case_studies.title, case_studies.author, case_studies.timestamp from case_studies, programs WHERE programs.id = case_studies.id Any ideas?
View Replies !
Average Query With 2 Rows From Same Table
My table: "answer" answerID answer(int) questionID(int) userID(int) answer1 is questionID = 1 answer2 is questionID = 2 WHERE userID is the same for both answer1 and answer2 I want the average of answer1/answer2: AVG(ans1/ans2), but how?
View Replies !
Query With 3.3million Rows Is Slow?
I'm not that great with MySQL...so I was hoping someone could help me out. The query I'm running is too slow...can anyone tell me what I can do to speed it up..if I can at all? I was wondering if because ZipListMatrix has 3.3 million rows that 8 seconds is all the faster it's going to be. Any help is greatly appreciated! I have already "optimized" the tables.
View Replies !
Get Rows From Multiple Tables In One Query
Is there a way to select rows from multiple tables in one query? Say I have the following tables and columns:Storestore_idItemitem_iditem_store_id I want to get a store by it's id + all the items associated with that store id. Do I have to make two separate queries for this? One to get the store, and another to get all the items for that store.
View Replies !
Query Browser :: How To View Rows?
I'm having a hard time with the Query Browser. I can't figure out how to view the rows. When I click on the table in the Browser, nothing shows up and at the bottom there is a message saying Library Error Number 3. I am sure this is something simple but it's making me tear my hair out.
View Replies !
Performace Question. 525,600 Rows In One Query
I am wondering which would be the best option. I have a database holding prices for every minute of trading. This means that getting a year of price data for graphing would mean that I am potentially requesting 525,600 (more on a leap year) rows. The graph only needs to have a resolution of one point per day, so should I: 1. query 525600 rows and then take one price per day 2. create a query to only take one price per day ?
View Replies !
Getting Rows Multiple By List Query
I have a list of values (constants) that I use to find matching rows in a single table as follows: "select id, name from articles where id in(1,2,3,2,3,2,2)" seems very simple, but my problem is, the query delivers only 3 lines, of course, because the last four numbers are redundant. But my need is, to get a row for each number in the list, wheather it is doubled or not.
View Replies !
Query Delete All Rows From The Table?
I have a table called "repairs" with multiple rows (let's say for the purposes of this post - from repair_id=1 through to repair_id=10) Why does this query delete all rows from the table? DELETE FROM repairs WHERE repair_id=3 OR 4
View Replies !
Retrieve Everything AND Count Rows In One Query
set rsminmax = con.execute("SELECT * FROM `minirules_minmax` where RuleId = '" & contractId & "'") set rsminmax2 = con.execute("SELECT COUNT(*) FROM `minirules_minmax` where RuleId = '" & contractId & "'") Is there any way to do this in one SQL query?
View Replies !
How To Update Multiple Rows With One Query?
I am using PHP/MySQL and need to update 7 rows with one query. Can someone tell me how to do the following so it will update the row for each day of the week? (This obviously doesn't work) $sql = "UPDATE business_hours SET hours='$sunday' WHERE id='$id' AND day='sunday' AND SET hours='$monday' WHERE id='$id' AND day='monday'";
View Replies !
Updating Multiple Rows In One Query
tried to find the answer with search but didn't return any answers. OK, here is the table table test ------------------------ | test_id | test_order | ------------------------ | 1 | 1 | ------------------------ | 2 | 2 | ------------------------ | 3 | 3 | ------------------------ I'm trying to change the orders in one query, but not sure how to do that. phpMyAdmin shows me the code like this Quote: $sql = 'UPDATE `test` SET `test_order` = ƈ' WHERE `test_id` = 1;' 'UPDATE `test` SET `test_order` = Ɖ' WHERE `test_id` = 2;' 'UPDATE `test` SET `test_order` = Ƈ' WHERE `test_id` = 3;' . ' ' I'v tried that but got a syntax error. MySQL version is 4.0.26, can anyone help please?
View Replies !
Query Pulls Out Multiple Rows Even Though Theres Only One
Ive got a query thats selecting info about a product from a table called items and joining on a table called itemimages to get its associated images. The product can have more than one image. If i run the query on an item with 2 images i get 2 results for one item.....when theres only one item.....it seems to duplicate the item for each of its images.... SQL SELECT items.*, itemimages.* FROM items INNER JOIN itemimages ON (items.itemID = itemimages.itemID) WHERE categoryID = '$category' AND active = 'yes' LIMIT $start, $limit"
View Replies !
Update Multiple Rows Using One Query
I have a product table, when one product is out of stock, I want to set the stock status to "0". I'm using the following form to do it. PHP Code: <?php if(isset($_POST['update'])) { $code = $_POST['code']; $stock = $_POST['stock']; $sql= "UPDATE product SET stock=$stock WHERE itemcode=$code";Â Â Â Â $query = mysql_query($sql,$conn); if ($query) {echo "<H1>UPDATED</H1>";} else {echo "<H1>Update Failed</H1>";} } else { ?> <div> <form method="POST" action="<?php echo $PHP_SELF ?>"> Â Â Â Item Code: <input type="text" name="code"><br> Â Â Â <br> Â Â Â Stock Status: Â Â Â Â <select name="stock"> Â Â Â Â <option>Please Select</option> Â Â Â Â <option value="0">Out of Stock</option> Â Â Â Â <option value="1">In Stock</option> Â Â Â Â </select>Â Â Â Â Â Â Â <br> Â Â Â <br> Â Â Â <input type="submit" value="Update" name="update"> </form> </div> <? } ?>
View Replies !
Insert Multiple Rows Single Query
I create a table with 7 columns id Mdate col1 col2 col3 col4 col5 as above shown id is small int, mdate is date and col1 to 5 are tinyint and i want to insert the values . id is auto increment and i want mdate a day for one row. and other column set to zero what i want is to enter in single query.
View Replies !
Reverse Order Of Rows In A LIMIT Query
I have the following query: SELECT * FROM stocks WHERE ticker = 'CBU' AND `date` < '2009-01-31' ORDER BY `date` DESC LIMIT 3 This returns the 3 most recent dates out of a total of 20 rows. I would like to use the 3 most recent dates BUT IN REVERSE order. if I use the ASC command, it will not work as it will return the 3 oldest dates in the 20 rows, not the 3 most recent in reverse order. How can I reverse the order of the 3 most recent dates returned with the LIMIT command in the query above?
View Replies !
Select Double Rows In One Table In One Query
I try to select double rows in the same table within one query. I can do it with 2 query's but i wonder if it's possible with one? The table 'admin_category: Quote: id name sub 1 cd 0 2 dvd 0 3 action 1 4 new 1 5 general 2 The current query which i use: PHP Code:  SELECT a.name AS sub, b.name AS category FROM admin_category a LEFT JOIN admin_category b ON a.sub = b.id WHERE a.id = '4' What i try to reach with above query is that row 4 will be selected, take the name of it (new) and also the main category (b.name as category) by doing a left join on the same table where the sub id = the id. The output of above query is: sub = new category = NULL (Category should be 'cd' but it's not)
View Replies !
Update Numerous Rows In A Single Query
Let's say I have 6 rows in my MySQL table ID RANK ============= 1 1 2 2 3 3 4 4 5 5 6 6 I want to delete ID #3, that's ok, BUT I want to downgrade all the rows that has a RANK value higher than him (3). So my table would look like this afterwards; ID RANK ============= 1 1 2 2 4 3 5 4 6 5 I want to be able to update a field within the query, something like this $deleted_rank=3; //the rank number that got deleted mysql_query = UPDATE tablename SET rank='rank--' WHERE rank>'$deleted_rank' the field RANK is an INT I know the rank-- thing doesn't work, but I want to know how I can achieve this in a single query, I don't want to do a WHILE on this.
View Replies !
Updating Multiple Rows With Same Fields (in One Query?)
I have 2 tables here table categories +--------------------------------------- + | cat_id | cat_name | cat_total_articles | +----------------------------------------+ | 1 | PHP | 23 | +----------------------------------------+ | 2 | MySQL | 17 | +----------------------------------------+ table articles +---------------------------- + | article_id | article_cat_id | +-----------------------------+ | 1 | 1 | +-----------------------------+ | 2 | 2 | +-----------------------------+ Now I've changed an article's category from cat1 to cat2, and I need to update cat_total_articles of both cat1 (minus 1) and cat2 (plus 1) in category table. Is it possible to combine the following queries into one statement? PHP mysql_query("UPDATE categories SET cat_total_articles = cat_total_articles + 1 WHERE cat_id = 2"); PHP mysql_query("UPDATE categories SET cat_total_articles = cat_total_articles - 1 WHERE cat_id = 1");
View Replies !
Query Which Gets Rows Based On A Radius, Lon And Lat Doesn't Work?
I have found this query which gets rows based on a radius. I need this for zip codes based on lon and lat's. $sql2 = "SELECT * FROM table as z WHERE (SQRT( (69.1 * (".$userLat." - z.lat)) * (69.1 * (".$userLat." - z.lat)) + (53.0 *(".$userLong." - z.lon)) * (53.0 *(".$userLong." - z.lon))) <= ".$userRadius." )"; return $sql2; $res = mysql_query($sql2, $connDB) or die(mysql_error()); $row = mysql_fetch_assoc($res); based on a test zip code gives a result like SELECT * FROM table as z WHERE (SQRT( (69.1 * (52.399834 - z.lat)) * (69.1 * (52.399834 - z.lat)) + (53.0 *(4.840762 - z.lon)) * (53.0 *(4.840762 - z.lon))) <= 100 ) the lat and lon of the test zip code are right. As you can see z.lat and z.lon don't get any value. And these would be every lat and lon in table. In my db table lon and lat are decimal(10,6) type with a default value of 0.000000
View Replies !
Help With Updating Duplicate Rows In Mysql Query.
Quote: SELECT id, count(*) AS numlist FROM products GROUP BY category, name, brands HAVING numlist > 1 ORDER BY id ASC What it does is find the duplicates. I also have a column called "app" which has a default set to "1". So now what I want to do is that when duplicates are found, I want the first duplicate row in each group to stay as a "1" and the others in the same group to be updated to a "2". I need this done for every group. How can I do this. I have looked high and low accrossed the web, but can't seem to find any solution. I have managed to find out how to group them and count the number of listings in each group, but I can't seem to figure out how to do the rest. Also, if possible, I would like it to be done with one query.
View Replies !
Why Does The Slow Query Log Show More Rows Than Exist?
# Time: 070528 17:14:57 # User@Host: counter[counter] @ localhost [] # Query_time: 3 Lock_time: 0 Rows_sent: 7 Rows_examined: 120647 SELECT SQL_CACHE `webpageUrl`, `webpageName`, COUNT(*) AS `count`, (COUNT(*) / (SELECT COUNT(*) FROM _1_log)) AS `pct` FROM _1_log GROUP BY `webpageUrl` ORDER BY `count` DESC LIMIT 7; mysql> select count(*) from _1_log; +----------+ | count(*) | +----------+ | 111824 | +----------+ 1 row in set (0.00 sec)
View Replies !
Query To Display The Rows As Colums Is Not Working!!
I want a select query to get two columns. but i need to get these columns one below the other that is consider that i have a table student in that i have 2 columns name mark. Now i want the result as Name Raj Rina Tina Marks 80 90 70 I tried the --vertical option of mysql and G option in the query. for example when i tried select *from studentsG it displayed *********** 1. row *********** name: Raj marks : 80 ********** 2. row ************ name: Rina marks : 90 ********** 3. row ************ name: Tina marks : 70 but i want to display Name Raj Rina Tina Marks 80 90 70
View Replies !
Optimizing Search Query For Millions Of Rows
I have mysql 4.1 and Im having a difficult time optimizing this query. select domain, length(domain) as len from domains where length(domain) <= ཌ' and not (domain regexp '[[:digit:]]') and domain not like '%-%' and price > Ɔ' and price < ཌ' and end > ��-12-01' order by end ASC, len ASC The following query outputs: | id | select_type | table | type | possible_keys | key | key_len | ref | rows | extra | ------------------------------------------------------------------------------------------------------------------------------------- | 1 | SIMPLE | domains | ALL | end | NULL | NULL | NULL | 2600000 | Extra where; Using filesort | My indexes are: ID - PRIMARY, Unique domain - Unique end Is there anyway this query could be optimized anymore? With only 2.6 million rows its taking a 5 or 6 seconds. It looks like its not finding the right keys.
View Replies !
How Do I Make Rows From Another Table Appear As Columns In Query?
I have a join query (which r937 kindly helped me out with) which joins a table of tracks with a table of albums in a many-to-many relationship. I also have a table called links with a column of URLs called links. There's also a column of link categories called linkTypes which is of type enum with three possibilities - artist, album and track. What I'd really like to do is to add three columns to the result set (if that's the correct term) of the join from above i.e. I'd like to add trackLinks, artistLinks, albumLinks. So I guess my question is: How can I make columns on the fly by using field values from another table? In answer to the first thquestion - why don't you just add the columns to those two tables? The answer is because in the future I will need an undetermined number of each of these columns, e.g. one artistLink column per affiliate - artistLinkItunesUS, artistLinkItunesUK etc. So is this something I can feasibly do without restructuring the database or should I use a couple of queries and try combine the data through PHP? Or perhaps I'm looking at the relationships incorrectly? Having to add columns like that does seem like a one-to-many relationship which I haven't taken care of.
View Replies !
UPDATE Multiple Rows In Mysql (in One Single Query)
trying to UPDATE multiple rows with mysql. I know how to do it with multiple queries but i think it would be less resource consuming generating mysql query code with php and update all one single step. here is the method i usually employ: $value_column_1 = array(); $value_column_2 = array(); .....
View Replies !
What Query To Check If Any Rows Exist Satisfying WHERE Clause?
I'm looking for a query that will check if any rows exists in a table according to a WHERE condition. I know I can use COUNT(*) but then mysql will do unnecessary task of counting all the rows whereas I just need true or false. So far I did this: SELECT COUNT(*) AS exists FROM mytable WHERE ... Sometimes I just select the first row and check later in php how many rows have been returned: SELECT some_col FROM mytable WHERE ... LIMIT 1 But I cannot do this check (or can I?) in sql alone and I have problems when I want to use this in a subquery, for example: SELECT id, name, (SELECT COUNT(*) FROM mytable WHERE ...) AS exists FROM othertable WHERE surname='xxx' Can I do the same without using COUNT(*)? I would like a query that returns 0 or NULL if no rows were found, or 1 (or some other value) if 1 or more rows were found.
View Replies !
Count One Table's Rows From Multi Table Query
here are my tables (condensed) FEEDS feed_id site_id SITE site_id site_name ARTICLES article_id feed_id link I want to create a query that returns the total number of articles for every site_id (which is unique in the SITE table). I have this: PHP $gsite = mysql_query("SELECT site.site_id, feeds.feed_id, COUNT(articles.article_id) AS acont FROM site,feeds,articles WHERE feeds.site_id = site.site_id AND articles.feed_id = feeds.feed_id group by site.site_id", $connection) or die(mysql_error()); The query does not use JOIN, ON and all that good stuff. I just need the following variables to run through a loop: site_id the number of articles rows per site_id
View Replies !
Comparing Age
So the birthdays in my MySQL table are in a column called DOB and in the format of say: March 8 1985. Now i have my own PHP function that will convert that to a nice numerical value of age relative to today, which is perfect. it is called getAge(). However, i can't seem to be able to parse an SQL query with that function inside...is there any way to parse my own PHP functions inside an SQL query?
View Replies !
Comparing
I'm currently working with two tables; A scheduling table and a document table. Basically I'm trying to make a query that says this -- "give me everything from this month and day in the Document table that's not in the Schedule"
View Replies !
What's Wrong With My Query To Filter Double Entries And Skip Empty Rows?
I am trying to get filter a database table. - skip empty rows (i.e. ecardNameSender is empty) - filter double entries $sql = "SELECT COUNT(*) as total FROM tblEcards WHERE ecardNameSender != '' GROUP BY ecardEmailFriend"; $result = @mysql_query($sql, $connDB); $row = mysql_fetch_assoc($result); $totalPics = $row['total']; echo $totalPics; What's wrong with my query?
View Replies !
Comparing Versions Of Sql
I'm taking up a new position and have never used sql before although use and code in lots of other languages. When doing a bit of survey I find many many versions of commercial and public versions of sql. Can anyone tell me if the syntax is generally similar or are they completely different. If I invest time learning mysql on XP or Linux will that be useful if I end up using something like Oracle later on? The only one I would avoid is MS.like things that work occasionally.
View Replies !
Comparing Two Tables
I have these tables: table02 Id | tab01_field 1 | 00258 2 | 00041 Code: table01 Id | tab01_field 1 | 00258 2 | 00123 3 | 00825 4 | 00041 5 | 00005 table02 Id | tab01_field 1 | 00258 2 | 00041 When run a query to see the common records in both tables it returns a right result select table01.tab01_campo from table01,table02 where table01.tab01_field=table02.tab01_field Code: 00258 00041 But when I try to see the the uncommon records it returns select tab01_campo from table01,table02 where table01.tab01_field<>table02.tab01_field Code: 00258 00123 00123 00825 00825 00041 00005 00005 You can see, it returns the uncommon records twice, but also returs the common records. How could make a query tah returns only the uncommon records? Code: 00123 00825 00005
View Replies !
Comparing Times
I'm creating a voting system, and want to prevent people from cheating. Therefore I'm logging their IP, and the time they voted, and what I'm planning to do is have a script which will delete any records which have been in the database for say 24 hours. To get the length of time I was gonne use: HOUR(TIMEDIFF(NOW(),time))
View Replies !
Comparing Dates?
i have an 8 digit date string that i want to compare to a column of type 'date' in a MySQL db. the 8 digit string is in the format 'CCYYMMDD'. the question is: do i need to put it into the 'CCYY-MM-DD' format in order to get correct output from the datediff function, or can i simply leave it how it is?
View Replies !
Data Comparing
i'm writting a program that uses my sql to compare a date time feild to a date that i have to count call on one date the statment looks like this: SELECT Count(*) FROM wab_answers WHERE wabScreen=1 And DateDiff(answerTime,'" & curDate & "')=0; where curDate is string containing the date that i would like to compare. I'm not to sure on the correct way to do this. Just need a push in the right direction.
View Replies !
Comparing Differences
I want to find the fields that are in table A but not in table B. If I have: table A: id, name, scoreA table B: id, name, scoreB I want to find the scores that are in table A but not in B, by example: table a: 1,john,12|2,mike,14|3,neal,17 table b: 1,hellen,14|2,nolhan,12|3,vicky,10 After make the query: Score in A that are not in B: 17
View Replies !
|