4 ms·
> All of those can be done in the CLI and quickly. I'd love to know how.
by philh 11y ago
> All of those can be done in the CLI and quickly.
I'd love to know how.
- pjungwir 11y agoI use psql exclusively but I think those are good questions and I'd love to see someone give you an answer. Personally I don't feel much friction using psql even for "exploration", but I can see how a GUI would let you more easily follow data from one table to another. EDIT: I've just barely tried it, but it looks like you could say `\g |vim -` (with a csv plugin) or `\g |csvlook` (not great) and then browse/sort/aggregate the data from there. You probably need to change the output formatting though, because it looks like \g doesn't automatically give you something easy to parse. I have a feeling an interactive command-line CSV reader (less(1) for csv files) would be really useful to a lot of people, but I don't know of anything like that. csvkit isn't interactive as far as I know. csvtool dies on big files. Any alternatives? It would be the perfect thing to combine with \g. EDIT EDIT: Or just \pset pager and you don't need \g at all. . . .
- baldfat 11y agoI would try: First One Hour: https://www.khanacademy.org/computing/hour-of-code/hour-of-sql/v/welcome-to-sql https://www.khanacademy.org/computing/hour-of-code/hour-of-s... Also these two seem decent: http://sol.gfxile.net/galaxql.html http://sol.gfxile.net/galaxql.html http://sql.learncodethehardway.org/ http://sql.learncodethehardway.org/ The Hard Way has semi-decient issues. I would say SQL is easy to learn and would take only a few days to get the basics and than just learn as you come to stuff your missing. SQL is a very tiny language.
- philh 11y agoSo, when you read these parts of my post: > Edit your query to add an ORDER BY clause? > Check the primary key and write an UPDATE query? Hope not to make a typo when writing the key. > write a SELECT query? did you think that I was saying: "I think this is how I would do it in SQL, if only I knew SQL. Won't you please point me to somewhere I can learn SQL so that all my problems will be solved"? Because what I was going for was: "here is how I would do it in the CLI, but I much prefer how I would do it in PMA. Please tell me if there's a better way to do it in the CLI". I know SQL, I thought it was obvious that I knew SQL, and pointing me towards SQL tutorials is super unhelpful.
- baldfat 11y agoGo to Stack Overflow. Yes the reason why no one gave you your SQL code is we know that the GUI is just making SQL code for you. Sorry we probably have the mindset of we pointed you to the answer and we are not going to give you specific answer to your questions. I googled searched by copy and paste your question for 5 seconds for each question: > Edit your query to add an ORDER BY clause? http://www.techonthenet.com/sql/order_by.php http://www.techonthenet.com/sql/order_by.php > Check the primary key and write an UPDATE query? http://stackoverflow.com/questions/3930338/sql-server-get-table-primary-key-using-sql-query http://stackoverflow.com/questions/3930338/sql-server-get-ta... > write a SELECT query http://www.w3schools.com/sql/sql_select.asp http://www.w3schools.com/sql/sql_select.asp I think your issue is you are biased against CLI and think you get more benefit from a GUI. We can convince you what is best for you. We are just saying everything you pointed out is easily done in CLI with SQL commands. We believe everyone who works with databases should use CLI for a number of benefits because of our own experience.
- philh 11y ago...what part of > I know SQL, I thought it was obvious that I knew SQL, and pointing me towards SQL tutorials is super unhelpful. makes you think that I just need really basic SQL tutorials? I get the impression that you're glancing at my posts, picking out a few words, making up a question that someone else might have asked using those words, and answering that question instead of the one I'm actually asking. This is incredibly frustrating for me. As such, I decline to continue this conversation.
- baldfat 11y agoNo I am being super Ironic. You are listing EASY to do SQL commands as things that you don't know how to do. You than ask use to show you. What is your question besides show me how to do 1, 2, 3?