title: How to change the ownership of a table in database
body: <p>I Have a database rndb and created a new table myname_record which is created with owner "postgres" by default. In my program i should have change the owner to "rndb" but i missed it. Now i need to do it in console so i am login with command </p>
  
  <pre><code>psql=&gt;psql -Urndb 
  </code></pre>
  
  <p>and then changing the owner with following query</p>
  
  <pre><code>rndb=&gt;ALTER TABLE public.myname_record OWNER to rndb;
  </code></pre>
  
  <p>but it is saying you must be owner to do this changes. I can understood because i am login through rndb it is giving this error. But how to make this changes actually.</p>