, - alarforum@yandex.ru, !

  > Web > SQL,


e-mail

- 42 , !

 
19.11.2022, 15:30   #1
Naxal123
 
: 19.11.2022
: 1
 Oracle PostgresSQL

, sql shell - . . "" :

: "S_"

: "s_"

: "s_"

: "s__"

: "s_"

: "S_"

: "s_"

1: INSERT INTO "S__" ("_","","...

: "pk__"


:
 VARCHAR (20) NOT NULL ,
_ VARCHAR (20) NOT NULL UNIQUE ,
_ VARCHAR (20) NOT NULL ,
_ VARCHAR (20) NOT NULL ,
 VARCHAR (50) NOT NULL ,
 VARCHAR (20) NOT NULL ,
 VARCHAR (50),
 VARCHAR (2) NOT NULL ,
_ DATE NOT NULL ,
_ VARCHAR (1) DEFAULT 0 NOT NULL ,
 VARCHAR (20),
 VARCHAR (100),
 NUMERIC(10,2) NOT NULL,
CONSTRAINT PK__ PRIMARY KEY ()
);
CREATE TABLE S_ (
 VARCHAR (20) NOT NULL ,
 VARCHAR (50) NOT NULL ,
_ DATE,
_ DATE,
CONSTRAINT PK__ PRIMARY KEY ()
);
CREATE TABLE S_ (
 VARCHAR (20) NOT NULL ,
_ VARCHAR (20) NOT NULL ,
 VARCHAR (50) NOT NULL ,
_ DATE,
_ DATE,
CONSTRAINT PK__ PRIMARY KEY ()
);

 
CREATE TABLE S__ (
_ VARCHAR (20) NOT NULL ,
 VARCHAR (50) NOT NULL ,
 VARCHAR (20) NOT NULL ,
 VARCHAR (50),
_ DATE
);
 
CREATE TABLE S_ (
_ VARCHAR (20) NOT NULL ,
_ VARCHAR (20) NOT NULL ,
_ DATE,
 NUMERIC(10,2)
);
 

INSERT INTO "S_" ("","","_","_","_") VALUES ('2','','13',TO_DATE('05.10.06','DD.MM.RR'),TO_DATE('10.05.18','DD.MM.RR'));
INSERT INTO "S_" ("","","_","_","_") VALUES ('123',' ','90',TO_DATE('05.10.06','DD.MM.RR'),NULL);
 
INSERT INTO "S_" ("","_","","","","","_","_","","_","","_","") VALUES ('1','1','','','','','1','1','351330','345','7541900',TO_DATE('23.08.63','DD.MM.RR'),NULL);
INSERT INTO "S_" ("","_","","","","","_","_","","_","","_","") VALUES ('2','2','','','','','1','2','343456','345','6424580',TO_DATE('16.10.75','DD.MM.RR'),NULL);
INSERT INTO "S_" ("","_","","","","","_","_","","_","","_","") VALUES ('3','3','','','','','1','1','223476','452','5865920',TO_DATE('28.09.65','DD.MM.RR'),NULL);
 
INSERT INTO "S_" ("","","_","_") VALUES ('345','',TO_DATE('05.10.06','DD.MM.RR'),TO_DATE('01.06.15','DD.MM.RR'));
INSERT INTO "S_" ("","","_","_") VALUES ('452','',TO_DATE('05.10.06','DD.MM.RR'),NULL);
INSERT INTO "S_" ("","","_","_") VALUES ('111','',TO_DATE('05.10.06','DD.MM.RR'),NULL);

INSERT INTO S_ (_, , _, _)
VALUES (1, 2355, '6784/', TO_DATE('12-02-2012', 'dd-mm-yyyy'));
INSERT INTO S_ (_, , _, _)
VALUES (10, 1500, '0405/', TO_DATE('05-10-2015', 'dd-mm-yyyy'));

COMMIT;
 
ALTER TABLE S__ ADD CONSTRAINT FK__
FOREIGN KEY (_) REFERENCES S_ ();
 
ALTER TABLE S_ ADD CONSTRAINT FK_ FOREIGN KEY
(_) REFERENCES S_ ();
ALTER TABLE S_ ADD CONSTRAINT FK__ FOREIGN
KEY (_) REFERENCES S_ ();
ALTER TABLE S_ ADD CONSTRAINT FK__
FOREIGN KEY (_) REFERENCES S_ ();
 
ALTER TABLE S_ ADD CONSTRAINT FK__
FOREIGN KEY (_) REFERENCES S_ ();
Naxal123
21.11.2022, 13:04   #2
ADSoft
 
: 25.02.2007
: 4,065

- ?

- : , ,
- : , - ...
- : , - -

ADSoft; 21.11.2022 13:06.
ADSoft


- 42 , !

:



, fox pro SQL shurik666 SQL, 14 29.02.2012 15:36
(postgressql) kolyan4 2 23.01.2011 21:56
c , Excel. (, - ) Farridjan 1 03.07.2009 12:24
... ( ) 5Paladin5 3 02.07.2009 09:12
Oracle! _ 1 15.09.2008 12:09

- - - Delphi - Delphi - -