Computer Science, asked by nathgeetam, 1 year ago

Create table BOOK

BOOK ID Char (4)

Bname Varchar (15)

Author Varchar (20)

Price Decimal

Answers

Answered by anshu2437
5
create table book (BOOK ID char (4),Bname varchar (15),Author varchar (20),Price decimal);

nathgeetam: this is not the answer
nathgeetam: one editing is there
anshu2437: what
nathgeetam: a.) Identify the primary key of the Book Table, also mention the suitable reason for choosing it as a Primary Key
anshu2437: BOOK ID IS THE PRIMARY KEY
anshu2437: because it is unique in table there may be duplication of Bname, price,etc
anshu2437: it's fine
anshu2437: ok
nathgeetam: thnx alot..
Answered by ankurbadani84
1

Answer :-

Create table is use to define a table in oracle.

CREATE TABLE BOOK (

   BookId char (4) NOT NULL ,

   Bname Varchar (15),

   Author Varchar (20)),

   Price Number (5,2)

CONSTRAINT book_pk PRIMARY KEY (BookId)

);

In the above example BookId has a NOT NULL constraint. Also BookId is the primary key assuming it will be unique for each book.

Similar questions