New answers tagged postgresql-9.1
You should get the maximum value from c.pay then: Select b.enumber, b.bday, max(c.pay) as current_pay From employee b inner join humanr c on b.empid = c.empid group by b.enumber, b.bday
There are many ways to do this. Many will work both in SQL Server and Postgres, like using the ROW_NUMBER() function: WITH cte AS ( SELECT e.enumber, e.bday, c.empid, c.pay, ROW_NUMBER() OVER (PARTITION BY c.empid ORDER BY c.id DESC) AS rn FROM employee AS e INNER JOIN humanr AS c ON e.empid = ...
Stop postgresql service cp -a source_data_directory destination_data_directory chown -R postgres_user /destination_data_directory export PGDATA=destination_data_directory Changing data directory to destination_data_directory within postgresql.conf pg_ctl start
Top 50 recent answers are included