Welcome to this space👋. For all technology related posts: artificial intelligence and general technology demos, tech talks, cloud and web development tips, security and data best practices, look no further! ESEC BLOG APP was designed for just that!

Total Write-ups

16

Total Comments

7

Total Reactions

1055




Using PostgreSQL

 

Getting Data from a script

  • Download Script Using Query Tool and Run

 

Getting Data from a .csv file

  • Create Table <> and column names equal to columns in .csv file
  • Copy data from .csv using command:

--COPY <tablename ?(specify-columns)> FROM DELIMITERS ',' CSV

Warning: Copy cmd updates the db anytime it's run. Run once or more to generate extra rows.

 

Transfering data from public schema to any other

  • Create new schema and populate tables from "public"

--ALTER TABLE <> SET SCHEMA <>

 

Changing search path to simplify queries

--SHOW search_path;

* If public exists: change search_path to new schema, public
* If drop public: change search_path to new schema

--SET search_path TO ;

  • Try queries


reference url: None



Post Category: Data , Development



66 Favorites

Choose Reaction

1 ❤️   1 👍   1 🔥   63 💯  


1 Comments

Add Comment

Comment awaiting moderation.