Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please help me in creation of tables

 
Faisal Ishaque
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try this. it helped me. http://www.javaranch.com/drive/jdbc/index.jsp
 
Faisal Ishaque
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic