Skip to content

postgres useful commands

Rajesh Khadka edited this page Apr 2, 2020 · 4 revisions

functions

To get current time in postgres

Timezone: now()

UTC time : timezone('utc', now())

Join Multiple Tables

select * from **table_name** as user inner join **table_name** as profile on user.id = profile.doctor_id inner join **table_name** fee on profile.id = fee.doctor_profile_id where user.id='54800353-28f6-4e9d-bbc9-b8c3bca59594';

Clone this wiki locally