Tuesday, August 4, 2020

क्रमादेशन भाषा/संरचित पृच्छा भाषा पुस्तक की लिपि



CREATE TABLE vibhag
(   
  id         NUMBER(2,0),   
  naam       VARCHAR2(14),   
  sthan      VARCHAR2(13),   
  CONSTRAINTS pk_vibhag PRIMARY KEY (id)   
);

INSERT INTO vibhag(id,naam,sthan)
VALUES(10,'DHARM','KEDARNATH');
INSERT INTO vibhag(id,naam,sthan)
VALUES(20,'ARTH','SOMNATH');
INSERT INTO vibhag(id,naam,sthan)
VALUES(30,'KAAM','VISHWANATH');
INSERT INTO vibhag(id,naam,sthan)
VALUES(30,'MOKSHA','MAHAKAAL');




CREATE TABLE karmchari 
(   
  id             NUMBER(4,0),   
  naam           VARCHAR2(10),   
  karya          VARCHAR2(9),   
  adhikari       NUMBER(4,0),   
  pratham_dinank DATE,   
  vetan          NUMBER(7,2),   
  dastoor        NUMBER(7,2),   
  vibhagid       NUMBER(2,0),   
  CONSTRAINTS pk_karmchari PRIMARY KEY ( id),   
  CONSTRAINTS fk_vibhag FOREIGN  KEY (vibhagid) REFERENCES vibhag (id)   
);

INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid)
VALUES(7839,'OMKAR','ADHYAKSH',NULL,to_date('17-11-1981','dd-mm-yyyy'), 5000, NULL, 10 ); 
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7698, 'BRAMHA', 'VYAVASTHAP', 7839,   to_date('1-5-1981','dd-mm-yyyy'),   2850, NULL, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7782, 'VISHNU', 'VYAVASTHAP', 7839,   to_date('9-6-1981','dd-mm-yyyy'),   2450, NULL, 10  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid)  
VALUES(7566, 'MAHESH', 'VYAVASTHAP', 7839,   to_date('2-4-1981','dd-mm-yyyy'),   2975, NULL, 20  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7788, 'KASHYAP', 'MUNI', 7566,   to_date('13-JUL-87','dd-mm-rr') - 85,   3000, NULL, 20  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7902, 'PARASHAR', 'MUNI', 7566,  to_date('3-12-1981','dd-mm-yyyy'),   3000, NULL, 20 );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7369, 'VYAS', 'LIPIK', 7902,   to_date('17-12-1980','dd-mm-yyyy'),   800, NULL, 20  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7499, 'MAHARISHIDAYANAND', 'PRACHARAK', 7698,   to_date('20-2-1981','dd-mm-yyyy'),   1600, 300, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid)  
VALUES(7521, 'VIVEKANAND', 'PRACHARAK', 7698,   to_date('22-2-1981','dd-mm-yyyy'),   1250, 500, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid)
VALUES(7654, 'KESHAV', 'PRACHARAK', 7698,   to_date('28-9-1981','dd-mm-yyyy'),   1250, 1400, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7844, 'MADHAV', 'PRACHARAK', 7698,   to_date('8-9-1981','dd-mm-yyyy'),   1500, 0, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7876, 'VALMEEKI', 'LIPIK', 7788,   to_date('13-JUL-87', 'dd-mm-rr') - 51,   1100, NULL, 20  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid) 
VALUES(7900, 'KAALIDAS', 'LIPIK', 7698,   to_date('3-12-1981','dd-mm-yyyy'),   950, NULL, 30  );
INSERT INTO karmchari(id,naam,karya,adhikari,pratham_dinank,,vetan, dastoor, vibhagid)
VALUES(7934, 'RAJSHEKHAR', 'LIPIK', 7782,   to_date('23-1-1982','dd-mm-yyyy'),   1300, NULL, 10  );

No comments:

Post a Comment

Financial Year Oracle PLSQL Program

 CREATE OR REPLACE function FINANCIAL_YEAR(p_date DATE) return varchar2 IS    v_first     varchar2(4);    v_second    varchar2(4);    v_year...