Tag Archives: PostgreSQL

PostgreSQL Example – How to do Self Join Table

Hits: 7 Self Join Table Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable child_of varchar(255) ) Insert Rows Into Adventurers Table INSERT INTO adventurers (name, age, child_of) VALUES (‘Dallar Woodfoot’, 25, NULL), (‘Cordin Garner’, 29, NULL), (‘Keat …

PostgreSQL Example – How to Right Join Tables

Hits: 9 Right Join Tables Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255) ) Create Table Of Adventurer’s Equipment – Create table called equipment CREATE TABLE equipment ( – string variable name varchar(255), – string …

PostgreSQL Example – How to Outer Join Tables

Hits: 12 Outer Join Tables Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255) ) Create Table Of Adventurer’s Equipment – Create table called equipment CREATE TABLE equipment ( – string variable name varchar(255), – string …

PostgreSQL Example – How to Create Left Join Tables

Hits: 3 Left Join Tables Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255) ) Create Table Of Adventurer’s Equipment – Create table called equipment CREATE TABLE equipment ( – string variable name varchar(255), – string …

PostgreSQL Example – How to Create Inner Join Tables

Hits: 3 Inner Join Tables Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255) ) Create Table Of Adventurer’s Equipment – Create table called equipment CREATE TABLE equipment ( – string variable name varchar(255), – string …

PostgreSQL Example – How to Concatenate Multiple Table

Hits: 7 Concatenate Multiple Table Create Table Of Elves – Create table called elves CREATE TABLE elves ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255) ) Create Table Of Dwarves – Create table called dwarves CREATE TABLE dwarves ( – string variable …

PostgreSQL Example – How to Cartesian Product Of Tables

Hits: 5 Cartesian Product Of Tables Create Table Of Adventurers – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255) ) Create Table Of Adventurer’s Equipment – Create table called equipment CREATE TABLE equipment ( – string variable name varchar(255), – …

PostgreSQL Example – How to All Unique Values In Two Tables

Hits: 6 All Unique Values In Two Tables Create Table Of Elves – Create table called elves CREATE TABLE elves ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255) ) Create Table Of Dwarves – Create table called dwarves CREATE TABLE dwarves ( …

PostgreSQL Example – How to Update Rows Based On Another Table

Hits: 4 Update Rows Based On Another Table Create Table Of Elves – Create table called elves CREATE TABLE elves ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable alive varchar(255) ) Create Table Of Deaths – Create table called deaths CREATE TABLE deaths ( …

PostgreSQL Example – How to Insert Rows

Hits: 5 Insert Rows Create Table – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255) ) Insert Row – Insert row into the table adventurers INSERT INTO adventurers (name, age, race, weapon) VALUES (‘Fjoak Doom-Wife’, …

PostgreSQL Example – How to Delete Rows

Hits: 3 Delete Rows Create Table – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255) ) Insert Rows – Insert into the table adventurers INSERT INTO adventurers (name, age, race, weapon) VALUES (‘Fjoak Doom-Wife’, 28, …

PostgreSQL Example – How to Delete Primary Key

Hits: 6 Delete Primary Key Create Table – Create table called adventurers CREATE TABLE adventurers ( – integer variable adventurer_id INT, – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255), PRIMARY KEY (adventurer_id) ) Insert Rows – Insert into the table adventurers INSERT INTO …

PostgreSQL Example – How to Delete Duplicates

Hits: 6 Delete Duplicates Create Table Of Elves – Create table called elves CREATE TABLE elves ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable alive varchar(255) ) Insert Rows Into Elf Table INSERT INTO elves (name, age, race, alive) VALUES (‘Dallar Woodfoot’, 25, ‘Elf’, …

PostgreSQL Example – How to Delete All Rows

Hits: 3 Delete All Rows Create Table – Create table called adventurers CREATE TABLE adventurers ( – string variable name varchar(255), – integer variable age int, – string variable race varchar(255), – string variable weapon varchar(255) ) Insert Rows – Insert into the table adventurers INSERT INTO adventurers (name, age, race, weapon) VALUES (‘Fjoak Doom-Wife’, …