jdbc odbc

Ads
 

jdbc odbc

i have two tables in database 1table's attribute is foreign key of another in this case how to retrive value from both table and show in a gridview combine using java code

View Answers

February 24, 2011 at 11:26 AM

Sql query to retrieve values from two tables

SELECT * FROM emp e,dept d WHERE e.DEPT_NO = d.DEPT_NO;

where emp and dept are the database tables.

CREATE TABLE `emp` (                                     
          `EMP_NO` int(10) NOT NULL auto_increment,              
          `EMP_NAME` varchar(100) default NULL,                  
          `DESIGNATION` varchar(100) default NULL,               
          `JOINING_DATE` date default NULL,                      
          `SALARY` int(100) default NULL,                        
          `DEPT_NO` int(100) default NULL,                       
          PRIMARY KEY  (`EMP_NO`)                                
        );

CREATE TABLE `dept` (                     
          `DEPT_NO` int(100) default NULL,        
          `DEPT_NAME` varchar(255) default NULL,  
          `BUDGETNUMBER` int(10) default NULL,    
          `MANAGER` varchar(255) default NULL     
        );

Ads









Related Tutorials/Questions & Answers:
jdbc odbc
jdbc odbc   i have two tables in database 1table's attribute is foreign key of another in this case how to retrive value from both table and show in a gridview combine using java code   Sql query to retrieve values
jdbc odbc
= DriverManager.getConnection("jdbc:odbc:swing"); String sql = "INSERT...jdbc odbc  Sir, i want to get the selected value from JCombobox to ms...("JDBC All in One"); JComboBox petList = new JComboBox(petStrings
Advertisements
JDBC-ODBC
JDBC-ODBC  HI what should i give names for DNS and TNS in Administrative Tools so that there will be connection between Database (oracle) and java.Actually how to operate Administrative Tools
JDBC-ODBC
JDBC-ODBC  HI what should i give names for DNS and TNS in Administrative Tools so that there will be connection between Database (oracle) and java.Actually how to operate Administrative Tools
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
jdbc odbc
jdbc odbc  i want to fetch the data from the ms access and print on ms word for printing purpose?? the whole program is in swing to ms acess connectivity.. the whole set up is perform only printing part is remaining? so help me
Java JDBC ODBC
Java JDBC ODBC  What is the difference between JDBC and ODBC
JDBC ODBC related problem
JDBC ODBC related problem  i WANT HELP RELATED TO JDBC CONNECTIVITY WITH MS ACCESS.. HERE IS MY FULL CODE... import java.awt.Container; import... con; con = DriverManager.getConnection("jdbc:odbc:Digambar
JDBC-Odbc Connection
JDBC-ODBC Connection       JDBC-ODBC Connection is a JDBC driver that translates the operation in  JDBC into ODBC. For ODBC,it is a normal java application program. This bridge
jdbc odbc sql server exception
jdbc odbc sql server exception  Hi, I am trying to use sql server with java jdbc odbc but I am getting this exception java.sql.SQLException: [Microsoft][SQL Server Native Client 10.0][SQL Server]Incorrect syntax near '@P1
JDBC ODBC Connection In Java
JDBC ODBC Connection In Java In this section we will read about the various aspects of JDBC ODBC such as, JDBC-ODBC bridge, JDBC ODBC connection, how to create DSN etc. JDBC-ODBC Bridge As its name JDBC-ODBC bridge, it acts like
JDBC-Odbc Connectivity
JDBC-ODBC Connectivity       The code illustrates an example from JDBC-ODBC...;"jdbc:odbc:emp";   public 
how to set fetch size for jdbc odbc driver
how to set fetch size for jdbc odbc driver  What is the default fetch size for the JDBC ODBC driver and how can i fetch a set of results for JDBC ODBC driver?   Fetching results JDBC ODBC Driver A. The default fetch
How to Retrieve Excel data into mysql using type 2 JDBC-ODBC driver
How to Retrieve Excel data into mysql using type 2 JDBC-ODBC driver  Can any please help it is very urgent. I tried to read excel sheet using ODBC..."); Connection conn = DriverManager.getConnection("jdbc:odbc:excel
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.
online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.  please provide online quiz program coding using jsp, jdbc odbc connection with ms. access.. Thank you.   Create table test
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL... ODBC program,bt here I am getting error i.e Exception in Thread "main
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL... ODBC program,bt here I am getting error i.e Exception in Thread "main
ODBC connection
ODBC connection   import java.sql.*; import java.util.*; public...)c.newInstance(); String s="jdbc:oracle:thin:@localhost:1521:ORCL... ODBC program,bt here I am getting error i.e Exception in Thread "main
jdbc
= DriverManager.getConnection("jdbc:odbc:student"); Class.forName... using jdbc connection   import java.sql.*; public class CreateTable
jdbc
=DriverManager.getConnection("jdbc:odbc:access","",""); Statement st=null; st...jdbc  how to update int values of ms-access in jdbc program?   In MS Access database, use Number data type for int values. import
jdbc
("jdbc:odbc:student"); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver
JDBC
JDBC  why we use batch in jdbc
jdbc
jdbc  display the records using index in jdbc
jdbc
jdbc  Hai , Give a steps for jdbc connectivity
odbc MS EXCEL
odbc MS EXCEL  hey my whole database is stored in MS Excel. so please tell me that can we connect to that database. if yes, how to do that. please help me out i am doing it in netbeans can please tell me the steps
JDBC
JDBC  How to add set of queries in a single query in JDBC
jdbc
jdbc   how to write program to save data and retrieve data from the form in Java
jdbc
jdbc  why do we need to load jdbc drivers before connecting to database
JDBC
JDBC  how to set classpath for eclipse, java, where to copy jdbc connector
JDBC
JDBC  in class.forname which driver name we are writing for the connection from jdbc to sqlserver 2008
jdbc
jdbc  is it possible to use doget & dopost method with jdbc to call in a servlet programe

Ads