Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2004

    Question Unanswered: to create a student record


    Actually we are dng a project i.e designing a coll website which contains student database.
    when we enter a code in the site ...( that might be a roll no) shud open the concerned persons record.
    This record shud include the rollno,name of the student, branch,attendence %,and subject wise internal marks and total of those marks.

    the branches are cse,eee,ece,eie,mech of all 4 yrs
    the semesters that are gng on now are 1st yr
    I need the query part to create the table and insert the values.
    after creating the data i need to link it up with html code and get it displayed on the site so that as soon as someone logs into the site and enters a particular code they shud get the concerned persons record with all the above details.Can we link up oracle to HTML?

    thank u c

  2. #2
    Join Date
    Sep 2003
    Virginia, USA
    Tables should be created before a user inserts data. Otherwise, you cannot define privileges or create PL/SQL referencing the table. Did you mean to say, "create the record"?

    If you really meant "create the table" then you should have a template for each table stored as a schema in your database. When a table needs to be created you can use the SQL statement CREATE TABLE x AS SELECT * FROM mytemplate WHERE 1=2; This statement will create a new table as a copy of the template, but will not copy any of the rows. If you want it to copy the rows too, just remove the WHERE clause.

    If the student table and templates are stored in separate schemas, then include the schema names in your SQL statement. For example, CREATE TABLE STUDENT.ROLL AS SELECT * FROM TEMPLATE.ROLL WHERE 1=2;
    Author, Oracle Database 10g: From Nuts to Soup

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts