SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
POSTGRES DATABASE
http://facebook.com/jacek.fleszar
mailto:Fleszar@hotmail.com
CREATE TABLE "shipments" (
"id" integer NOT NULL,
"customer_id" integer,
"isbn" text,
"ship_date" timestamp with time zone);CREATE TABLE "dzisiaj" (
"id" integer NOT NULL,
"dzien" integer,
"miesiac" text,
"data" timestamp with time zone
);
insert into shipments values (2,
07');

107,

'0394800753','2001-09-22 20:18:56-

select * from shipments

CREATE FUNCTION "add_shipment" (integer,text) RETURNS timestamp with time zone
AS '
DECLARE
customer_id ALIAS FOR $1;
isbn ALIAS FOR $2;
shipment_id INTEGER;
right_now timestamp;
BEGIN
right_now := ''now'';
INSERT INTO shipments VALUES ( 3, customer_id, isbn, right_now );
RETURN right_now;
END;
' LANGUAGE 'plpgsql'
select add_shipment(1,'newItem');

OPERATOR ????
Type

??????

Weitere ähnliche Inhalte

Andere mochten auch

Galileo Galilei
Galileo GalileiGalileo Galilei
Galileo Galileimcullmann
 
Common problems with email
Common problems with emailCommon problems with email
Common problems with emailTal Aviv
 
Intranet Mailing System Rahul Raj
Intranet Mailing System Rahul RajIntranet Mailing System Rahul Raj
Intranet Mailing System Rahul Rajvishnu56
 
How to write an email to your teacher
How to write an email to your teacherHow to write an email to your teacher
How to write an email to your teacherDerya Bozdogan
 
如何解决mailto乱码的问题
如何解决mailto乱码的问题如何解决mailto乱码的问题
如何解决mailto乱码的问题Jun Sun
 
3 models of communication
3 models of communication3 models of communication
3 models of communicationDiego Rodrigo
 

Andere mochten auch (9)

Galileo Galilei
Galileo GalileiGalileo Galilei
Galileo Galilei
 
Psycho essay
Psycho essayPsycho essay
Psycho essay
 
Common problems with email
Common problems with emailCommon problems with email
Common problems with email
 
Ferrari
FerrariFerrari
Ferrari
 
Intranet Mailing System Rahul Raj
Intranet Mailing System Rahul RajIntranet Mailing System Rahul Raj
Intranet Mailing System Rahul Raj
 
How to write an email to your teacher
How to write an email to your teacherHow to write an email to your teacher
How to write an email to your teacher
 
IMC of Coca Cola
IMC of Coca ColaIMC of Coca Cola
IMC of Coca Cola
 
如何解决mailto乱码的问题
如何解决mailto乱码的问题如何解决mailto乱码的问题
如何解决mailto乱码的问题
 
3 models of communication
3 models of communication3 models of communication
3 models of communication
 

Mehr von Jacek Fleszar

Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...
Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...
Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...Jacek Fleszar
 
Ggb datasheet-ggb-bp25-metal-bimetal-english
Ggb datasheet-ggb-bp25-metal-bimetal-englishGgb datasheet-ggb-bp25-metal-bimetal-english
Ggb datasheet-ggb-bp25-metal-bimetal-englishJacek Fleszar
 
Rock star david bowie is dead
Rock star david bowie is deadRock star david bowie is dead
Rock star david bowie is deadJacek Fleszar
 
Postgre type/Create Type
Postgre type/Create TypePostgre type/Create Type
Postgre type/Create TypeJacek Fleszar
 
POSTGRE DATABASE- recommend-FLESZAR JACEK
POSTGRE DATABASE- recommend-FLESZAR JACEK POSTGRE DATABASE- recommend-FLESZAR JACEK
POSTGRE DATABASE- recommend-FLESZAR JACEK Jacek Fleszar
 
POSTGRE DATABASE- recommend
POSTGRE DATABASE- recommendPOSTGRE DATABASE- recommend
POSTGRE DATABASE- recommendJacek Fleszar
 

Mehr von Jacek Fleszar (12)

Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...
Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...
Niebieski i Kremowy Kolaż Społeczne i Emocjonalne Nauka SEL Działania Podstaw...
 
M giller
M gillerM giller
M giller
 
Ggb datasheet-ggb-bp25-metal-bimetal-english
Ggb datasheet-ggb-bp25-metal-bimetal-englishGgb datasheet-ggb-bp25-metal-bimetal-english
Ggb datasheet-ggb-bp25-metal-bimetal-english
 
5 gB - Poland
5 gB - Poland5 gB - Poland
5 gB - Poland
 
Zabawy???
Zabawy???Zabawy???
Zabawy???
 
Fleszar
FleszarFleszar
Fleszar
 
Rock star david bowie is dead
Rock star david bowie is deadRock star david bowie is dead
Rock star david bowie is dead
 
NO ~~
NO ~~NO ~~
NO ~~
 
IMP ??///
IMP ??///IMP ??///
IMP ??///
 
Postgre type/Create Type
Postgre type/Create TypePostgre type/Create Type
Postgre type/Create Type
 
POSTGRE DATABASE- recommend-FLESZAR JACEK
POSTGRE DATABASE- recommend-FLESZAR JACEK POSTGRE DATABASE- recommend-FLESZAR JACEK
POSTGRE DATABASE- recommend-FLESZAR JACEK
 
POSTGRE DATABASE- recommend
POSTGRE DATABASE- recommendPOSTGRE DATABASE- recommend
POSTGRE DATABASE- recommend
 

Postgres database

  • 1. POSTGRES DATABASE http://facebook.com/jacek.fleszar mailto:Fleszar@hotmail.com CREATE TABLE "shipments" ( "id" integer NOT NULL, "customer_id" integer, "isbn" text, "ship_date" timestamp with time zone);CREATE TABLE "dzisiaj" ( "id" integer NOT NULL, "dzien" integer, "miesiac" text, "data" timestamp with time zone ); insert into shipments values (2, 07'); 107, '0394800753','2001-09-22 20:18:56- select * from shipments CREATE FUNCTION "add_shipment" (integer,text) RETURNS timestamp with time zone AS ' DECLARE customer_id ALIAS FOR $1; isbn ALIAS FOR $2; shipment_id INTEGER; right_now timestamp; BEGIN right_now := ''now''; INSERT INTO shipments VALUES ( 3, customer_id, isbn, right_now ); RETURN right_now; END; ' LANGUAGE 'plpgsql' select add_shipment(1,'newItem'); OPERATOR ???? Type ??????