I am trying to visualize tables and their relations using pgAdmin. I have understood that there is a query visualizer tool available for pgAdmin. However, that only is useful if you are dealing with queries. My main goal is to generate a graphical representation of all the tables available in database. Answer…
Tag: database
PostgreSQL – dump each table into a different file
I need to extract SQL files from multiple tables of a PostgreSQL database. This is what I’ve come up with so far: However, as you see, all the tables that start with the prefix thr are being exported to a single unified file (db_dump.sql). I have almost 90 tables in total to extract SQL from, so it is a…
42501: INSUFFICIENT PRIVILEGE ERROR while querying in Postgresql
I am trying to query a database table in postgresql, but every time I run the below query it gives me the INSUFFICIENT PRIVILEGE error. What possibly could be the reason for such permission denied …
Database structure for “customer” table having many orders per customer and many items per order
I am trying to create a database where each customer has several orders(new orders daily) and each order has several items. I had planned creating a table of customers and creating a table per order …
SQL auto_increment behaviour
My first question is: Can I manually input ID into an auto_increment column of a table? For example: I have 10 records with ID from 1 to 10. Can I manually input the 11 record with the ID of 3 (yes, it’s a duplication!) My second question is: I assume that it’s possible to manually input ID number…
What does the ( ‘ > ) symbol mean in the command line in MySQL?
I’m new to sql and for some reason, the arrow symbol ( -> ) that I am used to seeing in teh command line, which mean it is ready for input, is now displayed as ( ‘> ) and it does not accept commands. What does it mean and how do I get back to ( -> ) ? Thanks
mongoDB vs mySQL — why one is better than another in some aspects [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, …
Get highest ids in by an inner join and max id
I got two tables, conversations and messages, What I’d like to do is to make a inner join from conversations to messages. Here is my query: SELECT messages.msg, messages.`read`, …
Converting Numbers to Words in MYSQL result! Using Query
I am trying to print a output as follows when I execute a query in mysql. Name Salary Sal_in_Words Mohan 45000 Rupees Forty Five Thousand Only The column Salary has a value 45000 and in the …
Calculating a Moving Average MySQL?
Good Day, I am using the following code to calculate the 9 Day Moving average. But it does not work because it first calculates all of the returned fields before the limit is called. In other words it will calculate all the closes before or equal to that date, and not just the last 9. So I need to calculate