GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  Database  >  MYSQL
Go To First  |  Previous Question  |  Next Question 
 MYSQL  |  Question 40 of 45    Print  
How will retrieve nth level categories from one query in mysql ?

  
Total Answers and Comments: 1 Last Update: January 23, 2008     Asked by: Vishwapati Mishra 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 23, 2008 03:55:04   #1  
saud.rashid Member Since: January 2008   Contribution: 1    

RE: How will retrieve nth level categories from one query in mysql ?
SELECT c1.CategoryID, c1.Name, c2.CategoryID, c2.Name
FROM category AS c1, category AS c2
WHERE c1.CategoryID = c2.ParentID
ORDER BY c1.CategoryID, c2.CategoryID

 
Is this answer useful? Yes | No

 Related Questions

Latest Answer : MySql has many advantages in comparison to Oracle.1 - MySql is Open source, which can be available any time 2 - MySql has no cost of development purpose.3 - MySql has most of features , which oracle provides 4 - MySql day by day updating with new facilities.5 ...
Read Answers (5) | Asked by : Arul Murugan.B

Latest Answer : MySQL only supports one index type, but implements different data access paths using the various table types. The eight types of Oracle indexes are B-tree, B-tree Cluster, Hash Cluster, Reverse Key, Bitmap, Bitmap Join, Function-Based, and Domain. ...
Read Answers (3) | Asked by : Mukesh

Latest Answer : really good question ...
Read Answers (3) | Asked by : crjyothi

1. How to create the stored procedures in mysql and it will be write on where?2. Difference between SQL stored procedures, MYSQL stored procedures, SQL Server stored procedures?
Read Answers (1) | Asked by : R. Muthusamy Irungovel

Latest Answer : CREATE TRIGGER `tgr_name` AFTER UPDATE ON `addresses` FOR EACH ROW begin    update products set countryName = new.countryName where products.shippingAddressId = old.id;end; ...
Read Answers (1) | Asked by : sripri

Latest Answer : int varchar char date double long etc are available for mysql ...
Read Answers (2) | Asked by : sripri

Latest Answer : ans of this question is given above ...

Latest Answer : Reload privileges are mainly used when a new user is created andyou want to apply the changes without re starting Mysqlsyntax to use:mysql -u username -ppassword -e"flush privileges"; ...


View Question | Asked by : Robert


 Sponsored Links

 
Related Articles

Using XMLType for Handling XML Data in the Database

Using XMLType for Handling XML Data in the Database Being an object type XMLType can not only be used to store XML data in the database but also to operate on that data via its built in methods Regardless of the storage model you choose XMLType provides a set of XML specific methods to operate on XM
 

Using Oracle Database for Storing, Modifying, and Retrieving XML Data

Using Oracle Database for Storing Modifying and Retrieving XML Data With Oracle XML DB you have various XML storage and XML processing options allowing you to achieve the required level of performance and scalability One of the most interesting things about Oracle XML DB is that it allows you to per
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Moving All the XML Processing into the Database

Moving All the XML Processing into the Database In the preceding example the database server performs only a part of the XML processing while the rest is still performed by the PHP engine Specifically the database server generates an employees XML document based on the records from the hr employees
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

ODP.NET - Fundamental ODP.NET Classes to Retrieve Data

ODP NET Fundamental ODP NET Classes to Retrieve Data To retrieve data from an Oracle database using ODP NET we need to work with a few of the ODP NET classes At this point we will discuss the most fundamental classes available in ODP NET for retrieving data mosgoogle The following is the list of fun
 

High Level Data Link Control (HDLC)

High Level Data Link Control HDLC The High Level Data Link Control protocol was developed by the International Organization for Standardization ISO It is used for switched and non switched networks and is a bit oriented architecture The High Level Data Link Control has been accepted and used widel
 

What is an Ad Hoc Query

An Ad-Hoc Query is a query that cannot be determined prior to the moment the query is issued. It is created in order to get information when need arises and it consists of dynamically constructed SQL which is usually constructed by desktop-resident query tools. This is in contrast to any query which
 

What is Operational Database

Operational Database is the database-of-record, consisting of system-specific reference data and event data belonging to a transaction-update system. It may also contain system control data such as indicators, flags, and counters. The operational database is the source of data for the data warehouse
 

Evolution of database systems

The Evolution of Database systems File Management System Hierarchical database System  Network Database System  Relational Database System File Management System: The file management system also called as FMS in short is one in which all data is stored on a singl
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape