NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

/*
UN ID = 18413710
WEEK - 1
ACTIVITY - 1
DATE- 10/2/2018
*/

--@D:18413710week4.txt

--inserting into object_table named bill_address
INSERT INTO bill_address (street,city,country)
VALUES ('54 FESTIVE ROAD','NORTHAMPTON','UK');

INSERT INTO bill_address (street,city,country)
VALUES ('30 ENGLISH STREET','BEDFORD','UK');

-- inserting into the relational table with a ref to an object_table named bill_address

INSERT INTO customers (customer_id,customer_name,invoice_address)
SELECT 1,'MANDY MORRELL', REF(a)
FROM bill_address a
WHERE street = '54 FESTIVE ROAD';

SELECT * from customers;

-- inserting into states table first
INSERT INTO states (state,country)
VALUES ('BIHAR','INDIA');

-- updating sites table using states table
UPDATE sites s
SET s.state_ref = (
SELECT REF (a)
FROM states a
WHERE a.state = 'BIHAR')
WHERE s.site_id =1;

-- dropping customer table
DROP TABLE customers;

-- recreating customers table using object column
CREATE TABLE customers(
customer_id NUMBER(6),
customer_name VARCHAR2(25),
invoice_address invoice_address_type);

-- inserting into customers table

INSERT INTO customers
VALUES (2,'CAROLE MORRELL',invoice_address_type('1 MY WAY','LUTON','UK'));

-- inserting more value into states table
INSERT INTO states
VALUES ('ALBERTA','CANADA');

INSERT INTO states
VALUES ('VICTORIA','AUSTRALIA');

INSERT INTO states
VALUES ('QUEENSLAND','AUSTRALIA');

INSERT INTO states
VALUES ('DEHLI','INDIA');

-- inserting into sites
INSERT INTO sites(site_id,address,state_ref)
SELECT 9,address_type('1 MY WAY','QUEENSLAND','AUSTRALIA'), REF (a)
FROM states a
WHERE state = 'QUEENSLAND';

     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.