How Can We Help? Search Print How to copy a columns data from one table into a column in another table using PostgreSQL? Eg. name columns data from the users table into namecolumn in the new_users table. Execute the query below with different column names and table names and all the data for a specific column will be copied over to the selected column in another table. INSERT INTO...
How to delete a column in a database table using PostgreSQL via the command line
How Can We Help?
Search
Print Use the following statement
ALTER TABLE my_table DROP COLUMN my_column;
Replace my_table with the your table name and my_column with the column that you need to drop/remove.
How to add a Auto Increment Column to a PostgreSQL table
How Can We Help? Search Print Unfortunately Postgresql does not have Auto Increment columns so instead we create a Sequence that will act as a counter First we’ll need to create a sequence that we want to attch to our table CREATE SEQUENCE mytable_primary_id_seq; Then we need to assign the sequence to the column in our table that will act as the Autoincrement column ALTER TABLE mytable ...
How to remove the DEFAULT value of a table column in PostgreSQL
How Can We Help?
Search
Print Execute the following command
ALTER TABLE your_table ALTER COLUMN your_column DROP DEFAULT;
Replace your_table with the table and your_column with the column name where you wish to remove the default value
The above command is the same as setting the DEFAULT to NULL
How to add more than 1 column at a time to a PostgreSQL database table
How Can We Help?
Search
Print ALTER TABLE users ADD COLUMN fax int, ADD COLUMN phone int;
How to rename a table column in PostgreSQL
How Can We Help?
Search
Print ALTER TABLE tablename RENAME COLUMN oldColumnName TO newColumnName;
How to use the CONCAT MySql function to concatenate 2 table columns
How Can We Help? Search Print The CONCAT function can be used to concatenate two strings to form a single string or two columns to form a single column. Say for Example you have a table users with columns name and surname and you would like to display both as one name you would use the CONCAT function to join the two fields as in the Example below SELECT CONCAT(name," ",surname) AS fullname FROM...
Getting Started with Entity Modeling in OpenText AppWorks
This is post 4 of 4 in the series “OpenText AppWorks” A series of easy to follow articles introducing the AppWorks platform, standing up a local development environment, and developing within the low-code toolset. Standing up OpenText AppWorks 20.2 Docker Containers in 10 Minutes Setting up a Local SVN Container for your AppWorks Development Environment Low-Code Development with...
Low-Code Development with OpenText AppWorks
This is post 3 of 4 in the series “OpenText AppWorks” A series of easy to follow articles introducing the AppWorks platform, standing up a local development environment, and developing within the low-code toolset. Standing up OpenText AppWorks 20.2 Docker Containers in 10 Minutes Setting up a Local SVN Container for your AppWorks Development Environment Low-Code Development with...
Standing up OpenText AppWorks 20.2 Docker Containers in 10 Minutes
This is post 1 of 4 in the series “OpenText AppWorks” A series of easy to follow articles introducing the AppWorks platform, standing up a local development environment, and developing within the low-code toolset. Standing up OpenText AppWorks 20.2 Docker Containers in 10 Minutes Setting up a Local SVN Container for your AppWorks Development Environment Low-Code Development with...
Search Results Page
[vc_row][vc_column][us_post_title tag=”h1″ css=”%7B%22default%22%3A%7B%22margin-bottom%22%3A0%7D%7D”][us_separator][us_grid post_type=”current_query” pagination=”ajax” pagination_btn_text=”Show More” pagination_btn_style=”5″ pagination_btn_fullwidth=”1″ items_layout=”blog_14″...
Simple Predictive Modeling with Watson Analytics
This is post 6 of 7 in the series “Decision Management Systems” Poor Decisions Impacted by Bias in Software Development Organizational Culture Changes and Impacts on the Individual & Decision Making Using Data Analytics to Improve Heath Care Is Your Organization Using Evidence-Based Decision Making? Exploratory Data Analysis with Watson Analytics Simple Predictive Modeling with...
Exploratory Data Analysis with Watson Analytics
This is post 5 of 7 in the series “Decision Management Systems” Poor Decisions Impacted by Bias in Software Development Organizational Culture Changes and Impacts on the Individual & Decision Making Using Data Analytics to Improve Heath Care Is Your Organization Using Evidence-Based Decision Making? Exploratory Data Analysis with Watson Analytics Simple Predictive Modeling with...
How to increase the length of a character varying datatype in Postgres without data loss
How Can We Help?
Search
Print Run the following command:
alter table TABLE_NAME alter column COLUMN_NAME type character varying(120);
This will extend the character varying column field size to 120.
Remember to change TABLE_NAME to the relevant table name and COLUMN_NAME to the relevant column name.
Facebook Marketplace vs Craigslist: Which site is better?
After destroying MySpace, Orkut, Flickr and several other internet companies. FB is now after Craigslist, Olx, Kijiji, and 100s of other classified listing sites. The social networking giant opened its marketplace for everyone using FB. The new feature has not gone well with people using this site just for fun. But it has been received well by business owners using Facebook. Is FB’s new...
Themeisle Hestia Pro review
Hestia Pro is a powerful material design based WP template with which you can launch websites of various types without writing a single line of code. It is one of the best multi-purpose WordPress themes. According to Themeisle, the developer of Hesita Pro, HP is idle for business, blog, e-commerce sites based on the WordPress content management system. Is the Hestia Pro theme SEO friendly and...
StudioPress News Pro theme review
News Pro is one of the flagship StudioPress themes. It is also one of the most widely used WP magazine templates. Powered by the HTML5 markup, StudioPress NP is based on minimal flat responsive design. It is ideal for magazine sites that cover a variety of topics. NP is built on Genesis Framework which powers 100K+ sites. Is the News Pro theme suitable for your site? Is it easy to use and SEO...
How to send the output of a PostgreSQL query to a CSV file using the CLI (Command Line Interface)
How Can We Help? Search Print Log into the PostgreSQL interface on the command line, you should see a similar screen like the one below Welcome to psql 8.1.21, the PostgreSQL interactive terminal. Type: \copyright for distribution terms \h for help with SQL commands \? for help with psql commands \g or terminate with semicolon to execute query \q to quit ...
How to increase the lenght of a character varying datatype in PostgreSQL without data loss
How Can We Help?
Search
Print Run the following command
alter table TABLE_NAME alter column COLUMN_NAME type character varying(120);
This will extend the character varying column field size to 120.
Remember to change TABLE_NAME to the relevant table name and COLUMN_NAME to the relevant column name.