Press enter to see results or esc to cancel.

Generate the “create table” sql statement for an existing table in postgreSQL 3 Ways

 In this video I have shown 3 ways to get create table statements for an existing table in postgreSQL. 1. By creating a function.   CREATE OR REPLACE FUNCTION generate_create_table_statement(p_table_name varchar) RETURNS text AS $BODY$ DECLARE v_table_ddl text; column_record record; BEGIN FOR column_record IN SELECT b.nspname as schema_name, b.relname as table_name, a.attname as column_name, …

Continue reading

Read Write to excel using JAVA

 In this video, I have shown how you can create an excel file using java. 1. Project structure. 2. DB_Connection.java, This connection class is used to connect with database. You will need to update the host,dbname,username and password according to your project. package jinuclass; import java.sql.Connection; import java.sql.DriverManager; public class DBConnection_HR { public Connection …

Continue reading

Export MySQL table To Excel or CSV without any Software

In this video I have shown how you can export a MySQL table to excel or CSV without any third party software. All you can use CMD prompt to export export the table. 1. First login to your MySQL database through command prompt. You can check below link to see the steps for that. https://chillyfacts.com/connect-remote-mysql-database-using-command-prompt/ …

Continue reading