Click here to Skip to main content
15,849,907 members
Home / Discussions / Database
   

Database

 
AnswerRe: space in-between search parameters Pin
Sgg24529-Jun-07 1:36
Sgg24529-Jun-07 1:36 
AnswerRe: space in-between search parameters Pin
Sgg24529-Jun-07 1:39
Sgg24529-Jun-07 1:39 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:10
NAKRAINC28-Jun-07 23:10 
GeneralRe: NAKRA Pin
Pete O'Hanlon28-Jun-07 23:20
subeditorPete O'Hanlon28-Jun-07 23:20 
GeneralRe: NAKRA Pin
kubben29-Jun-07 2:53
kubben29-Jun-07 2:53 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:09
NAKRAINC28-Jun-07 23:09 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:08
NAKRAINC28-Jun-07 23:08 
NewsNAKRA Pin
NAKRAINC28-Jun-07 23:06
NAKRAINC28-Jun-07 23:06 
AS:1
QNO : 1
CREATE TABLE MEMBER_VIJAY(MEMBER_ID NUMBER(5),
MEMBER_NAME CHAR(25),
ACC_OPEN_DATE DATE,
MAX_BOOKS_ALLOWED NUMBER(2),
PENALTY_AMOUNT NUMBER(7,2)
);


CREATE TABLE BOOK_VIJAY(BOOK_NO NUMBER(6),
BOOK_NAME VARCHAR2(30),
AUTHOR CHAR(30),
COST NUMBER(7,2),
CATEGORY CHAR(10)
);



CREATE TABLE ISSUE_VIJAY(LIB_ISSUE_ID NUMBER(10),
BOOK_NO NUMBER(6),
MEMBER_ID NUMBER(5),
ISSUE_DATE DATE,
RETURN_DATE DATE
);

QNO : 2
DESC MEMBER_VIJAY;
DESC BOOK_VIJAY;
DESC ISSUE_VIJAY;

QNO : 3
ALTER TABLE ISSUE_VIJAY ADD( COMMENTS CHAR(100));

QNO : 4
ALTER TABLE MEMBER_VIJAY MODIFY(MEMBER_NAME CHAR(30));

QNO : 5
ALTER TABLE ISSUE_VIJAY ADD(REFERENCE CHAR(30));

QNO : 6
ALTER TABLE ISSUE_VIJAY DROP COLUMN REFERENCE;

QNO : 7
RENAME ISSUE_VIJAY TO LIB_ISSUE_VIJAY;

QNO : 8
INSERT INTO MEMBER_VIJAY VALUES(1,'RICHA SHARMA','10-DEC-05',5,50);
INSERT INTO MEMBER_VIJAY VALUES(2,'GARIMA SHARMA',SYSDATE,3,NULL);

QNO : 9
ALTER TABLE MEMBER_VIJAY MODIFY(MEMBER_NAME CHAR(20));
ORA-01441: cannot decrease column length because some value is too big

QNO : 10
INSERT INTO MEMBER_VIJAY VALUES(1,'VIJAY','27-JUNE-2007',110,100);
ORA-01438: value larger than specified precision allows for this column

QNO : 11
CREATE TABLE MEMBER101_VIJAY AS (SELECT *FROM MEMBER_VIJAY);

QNO : 12
INSERT INTO BOOK_VIJAY VALUES(101,'LET US C','DENIS RITCHIE',450,'SYSTEM');
INSERT INTO BOOK_VIJAY VALUES(102,'ORACLE-COMPLETE REFERENCE','LONI',550,'DATABASE');
INSERT INTO BOOK_VIJAY VALUES(103,'MASTERING SQL','LONI',250,'DATABASE');
INSERT INTO BOOK_VIJAY VALUES(104,'PL SQL-REF','SCOTT URMAN',750,'DATABASE');

QNO : 13
INSERT INTO BOOK_VIJAY VALUES(&BOOK_NO,'&BOOK_NAME','&AUTHOR',&COST,'&CATEGORY');
Enter value for book_no: 105
Enter value for book_name: C++
Enter value for author: LIPMAN
Enter value for cost: 450
Enter value for category: SYSTEM

QNO : 14
CREATE TABLE BOOK101_VIJAY AS (SELECT BOOK_NO,BOOK_NAME,AUTHOR,COST,CATEGORY FROM BOOK_VIJAY WHERE BOOK_NO NOT LIKE '1%');

QNO : 15
INSERT INTO BOOK101_VIJAY(SELECT *FROM BOOK_VIJAY);

QNO : 16
COMMIT;

QNO : 17
SELECT *FROM MEMBER_VIJAY;
SELECT *FROM BOOK_VIJAY;
SELECT *FROM ISSUE_VIJAY;
SELECT *FROM MEMBER101_VIJAY;
SELECT *FROM BOOK101_VIJAY;

QNO : 18
INSERT INTO BOOK_VIJAY VALUES(105,'NATIONAL GEOGRAPHIC','ADIS SCOTT',1000,'SCIENCE');

QNO : 19
ROLLBACK;

QNO : 20
UPDATE BOOK_VIJAY SET COST=300,CATEGORY='RDBMS' WHERE BOOK_NO=103;

QNO : 21
RENAME TABLE LIB_ISSUE_VIJAY TO ISSUE_VIJAY;

QNO : 22
INSERT INTO ISSUE_VIJAY(LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE)
VALUES(&LIB_ISSUE_ID,&BOOK_NO,&MEMBER_ID,&ISSUE_DATE);
Enter value for lib_issue_id: 7001
Enter value for book_no: 101
Enter value for member_id: 1
Enter value for issue_date: '10-DEC-06'

QNO : 23
COMMIT;

QNO : 24
INSERT INTO ISSUE_VIJAY(LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE)
VALUES(&LIB_ISSUE_ID,&BOOK_NO,&MEMBER_ID,&ISSUE_DATE);
Enter value for lib_issue_id: 7007
Enter value for book_no: 101
Enter value for member_id: 3
Enter value for issue_date: '10-JUNE-06'


INSERT INTO ISSUE_VIJAY(LIB_ISSUE_ID,BOOK_NO,MEMBER_ID,ISSUE_DATE)
VALUES(&LIB_ISSUE_ID,&BOOK_NO,&MEMBER_ID,&ISSUE_DATE);
Enter value for lib_issue_id: 7007
Enter value for book_no: 102
Enter value for member_id: 2
Enter value for issue_date: '15-JULY-06'

QNO : 25
UPDATE ISSUE_VIJAY SET RETURN_DATE=(ISSUE_DATE+15) WHERE LIB_ISSUE_ID=7004
OR LIB_ISSUE_ID=7005;

QNO : 26
UPDATE MEMBER_VIJAY SET PENALTY_AMOUNT=100 WHERE MEMBER_NAME='GARIMA SHARMA';

QNO : 27
SAVEPOINT X;

QNO : 28
DELETE FROM ISSUE_VIJAY WHERE MEMBER_ID=1 AND ISSUE_DATE<'10-DEC-06';

QNO : 29
DELETE FROM BOOK_VIJAY WHERE CATEGORY!='RDBMS' AND CATEGORY!='DATABASE';

QNO : 30
ROLLBACK TO X;

QNO : 31
COMMIT;

QNO : 32
DROP TABLE MEMBER101_VIJAY;

QNO : 33
DROP TABLE BOOK101_VIJAY;

QNO : 34
SELECT * FROM MEMBER_VIJAY;
SELECT * FROM BOOK_VIJAY;
SELECT *FROM ISSUE_VIJAY;
DESC MEMBER_VIJAY;
DESC BOOK_VIJAY;
DESC ISSUE_VIJAY;

QNO : 35
SELECT TNAME FROM TAB WHERE TNAME LIKE '%VIJAY';


*****************************************************************************
Questionhow to encrypt whole Database ? Pin
hdv21228-Jun-07 22:51
hdv21228-Jun-07 22:51 
AnswerRe: how to encrypt whole Database ? Pin
originSH29-Jun-07 1:06
originSH29-Jun-07 1:06 
QuestionMerge Replication rights Pin
Sgg24528-Jun-07 21:15
Sgg24528-Jun-07 21:15 
QuestionCritical probs to display records..., Pin
Member 387988128-Jun-07 19:02
Member 387988128-Jun-07 19:02 
AnswerRe: Critical probs to display records..., Pin
Devkranth Kishore Vanja28-Jun-07 21:24
Devkranth Kishore Vanja28-Jun-07 21:24 
GeneralRe: Critical probs to display records..., Pin
Member 387988128-Jun-07 21:57
Member 387988128-Jun-07 21:57 
AnswerRe: Critical probs to display records..., Pin
Navneet Hegde29-Jun-07 4:34
Navneet Hegde29-Jun-07 4:34 
QuestionParamaterized Queries vs. Stored Procedures Pin
martin_hughes28-Jun-07 9:17
martin_hughes28-Jun-07 9:17 
AnswerRe: Paramaterized Queries vs. Stored Procedures Pin
kubben28-Jun-07 10:09
kubben28-Jun-07 10:09 
AnswerRe: Paramaterized Queries vs. Stored Procedures [modified] Pin
Mike Dimmick28-Jun-07 10:22
Mike Dimmick28-Jun-07 10:22 
GeneralRe: Paramaterized Queries vs. Stored Procedures Pin
martin_hughes29-Jun-07 2:34
martin_hughes29-Jun-07 2:34 
AnswerRe: Paramaterized Queries vs. Stored Procedures Pin
originSH29-Jun-07 1:11
originSH29-Jun-07 1:11 
GeneralRe: Paramaterized Queries vs. Stored Procedures Pin
martin_hughes29-Jun-07 2:32
martin_hughes29-Jun-07 2:32 
QuestionView more than one page with CrystalReportViewer vb.net Pin
kindman_nb28-Jun-07 6:09
kindman_nb28-Jun-07 6:09 
QuestionAlternative of CONVERT function in MS Access Pin
FishiFishi28-Jun-07 4:12
FishiFishi28-Jun-07 4:12 
AnswerRe: Alternative of CONVERT function in MS Access Pin
leckey28-Jun-07 5:20
leckey28-Jun-07 5:20 
Questiondatetime code Pin
niki_nilu28-Jun-07 2:56
niki_nilu28-Jun-07 2:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.