I have a list of tables in a Netezza database and I want to get the name of primary key for each of the tables.
Can anyone provide me the query.
You can use this query.
SELECT * FROM _v_relation_keydata;
There is nothing sort of Primary Key thing in Netezza. If you want to look at the NULL or NOT NULL constraints for your required table you can enter the below commands from your nzsql command line
\d [YOURTABLENAME]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With