Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



How to select multiple table in MySql

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 05-11-2009
Member
 
Join Date: Nov 2009
Posts: 83
How to select multiple table in MySql
  

Hi,
What is the better way to choose tables in My SQL. I have a bunch of databases in Access. The databases comprises of database related to customer queries. I need some basic guidelines on how efficiently I can make selections in the tables. Also how to get list of operators in a listed tables. Also how to select more than one table at a time. Thanks in advance.

Reply With Quote
  #2  
Old 05-11-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: How to select multiple table in MySql

The selection of all or part of a table is done through the Select statement. In this selection must be specified - The fields we want to select & The table that we make the selection. Like for example in a table model you have a customers selection consist of names and addresses of customers with a statement like this - Select name, address from customers. If you wanted to select all fields, i.e the whole table, we could use the * wildcard as follows. Select * from Customers. It is also very useful to filter the records using conditions that are expressed after the Where clause. If we wanted to show customers in a given city would use an expression like this: Select * From Customers Where population Like 'Asia'
Reply With Quote
  #3  
Old 05-11-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: How to select multiple table in MySql

You can use operators will after the Where clause and can be skillfully combined using parentheses to optimize our selection at very high levels.
The basic Mathematical Operators are greater than, less than, less than or equal, unlike and same. In the same way the Logical Operators are and, or & not. The other specified operators used in table are, select the records whose field value resembles, disregarding case. Wildcards can also be used like * which replaces all fields, % which replaces anything or nothing in a chain and - which replaces a single character within a string.
Reply With Quote
  #4  
Old 05-11-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: How to select multiple table in MySql

A database can be considered as a set of tables. These tables are often related to each other and complement each other. Referring to our classic example of a database for an application of e-commerce, customers table we have been discussing can be perfectly coordinated with a table where we store the orders placed by each customer. This table orders may in turn be onnected to a table where we store the data for each inventory item. Thus we could easily obtain information contained in these three tables such as the appointment of the most popular item in a region where the designation of the article would be obtained from the Items table, the popularity (number of times the item has been sold ) would come from the orders table and the region would fall clearly on the customers table.
Reply With Quote
  #5  
Old 05-11-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: How to select multiple table in MySql

Besides the criteria already explained for consultation in tables, SQL also allows for a set of predefined functions. These functions, although basic, can help at times to express our selection of a simpler way without having to resort to additional operations by the script we are running. The functions used under this are Sum (field) - Calculates the sum of the records of the specified field, Avg (Field) - Calculate the average of the records of the specified field, Count (*) - We provide the value of the number of records that have been selected, Max (Field) - It tells us which is the maximum value of the field & Min (Field) - It tells us which is the minimum value of the field.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to select multiple table in MySql"
Thread Thread Starter Forum Replies Last Post
Select to cascade ajax + mysql Sahira Software Development 6 25-10-2010 02:24 PM
PHP mysql select unique records from one table Captain Carrot Software Development 6 13-05-2010 12:18 PM
Select unique records from a table Conraad Software Development 5 13-05-2010 12:01 AM
php/mysql select problem Fragman Software Development 3 30-11-2009 02:52 PM
Mysql select from multiple tables for php. afidelino Software Development 4 09-07-2009 06:13 PM


All times are GMT +5.5. The time now is 05:25 AM.