Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes Please help me in creation of tables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Please help me in creation of tables" Watch "Please help me in creation of tables" New topic
Author

Please help me in creation of tables

Faisal Ishaque
Greenhorn

Joined: Jun 09, 2003
Posts: 8
1)I have a table Department and Employee.
one Department have many Employees.
2)How to create these tables using SQL
3)And last one that,how cani get Employess for that Department using SQL in my Servlet apllication.
Adamu Yifru
Greenhorn

Joined: May 22, 2003
Posts: 6
try this. it helped me. http://www.javaranch.com/drive/jdbc/index.jsp
Faisal Ishaque
Greenhorn

Joined: Jun 09, 2003
Posts: 8
thanks ,
but my problem is that, one Dept table and Emp table, there is primary key called Dept_Id which determine the employees in Emp table.
1)how to create these tables using SQL. i.e supposein oracle.
2)And from my servlet application, how can I write SQL statement that fetch the employees of that Dept_Id.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"FaisalIshaqueJava FaisalIshaque",
Your name does not comply to the JavaRanch naming standard. Please see the description here
Please edit your profile and change your display name.
Accounts with invalid display names get deleted
Thanks,
Dave
 
 
subject: Please help me in creation of tables
 
Similar Threads
Joining tables
Testing @ManyToOne Relationships
Forigen key to Composit primary Key
question about Enity mapping
Use Comparator to sort more than one column