create SQL interface to insert data to table

cms technology web page configuration drupal web site
Setup and configuration of cms and drupal web site

 

SQL> select studentid, firstname, lastname from students;

Employee Salary statistics
STUDENTID FIRSTNAME LASTNAME
---------- ------------------------------ ----------------
1 michael Green
2 biLLy Hill
3 Jessica Harris
4 Jeff King
5 Jenny Allen

5 rows selected.

SQL>

CREATE PROGRAM TO MAKE INTERFACE TO ADD DATA TO TABLE:

SQL> edit newstu

prompt =========================================
prompt
prompt INSERT NEW STUDENT
prompt
prompt =========================================

prompt Please provide the following information:

accept stuid NUMBER prompt "ID :"
accept fname prompt "First Name:"
accept lname prompt "Last Name:"

INSERT INTO students(studentid, firstname, lastname)
VALUES ('&stuid', '&fname', '&lname');

 

 

SQL> start newstu
=========================================

INSERT NEW STUDENT

=========================================
Please provide the following information:
ID :6
First Name:joe
Last Name:eugine
old 2: VALUES ('&stuid', '&fname', '&lname')
new 2: VALUES (' 6', 'joe', 'eugine')

1 row created.

SQL> select studentid, firstname, lastname from students;

Employee Salary statistics
STUDENTID FIRSTNAME LASTNAME
---------- ------------------------------ -----------------
1 michael Green
2 biLLy Hill
3 Jessica Harris
4 Jeff King
5 Jenny Allen
6 joe eugine

6 rows selected.

SQL>

 

 

 


AttachmentSize
newstu.sql_.txt399 bytes

Custom Search