Re: [SQL] a newbie's question on language syntax
Subject: [SQL] a newbie's question on language syntax Date: Thu, Aug 26, 1999 at 11:22:31AM -0700 In reply to:Jack Lee Quoting Jack Lee([EMAIL PROTECTED]): My purpose was just to look at the content of the database, mysql. There showed nothing, no matter how I tried using select or show. BTW, I'm just wondering does commands have to be small latters or big letters? Answers to all of the above may be found in /usr/doc/mysql-doc/manual.ps or manual.html I would suggest you try out the examples in Section 8 (MYSQL Tutorial) -- COBOL programs are an exercise in Artificial Inelegance. ___ Wayne T. Topa [EMAIL PROTECTED]
[SQL] a newbie's question on language syntax
Hi: Thanks for reading my problem. I got MySQL installed a while ago. My problem is how to display database(or table) content with proper syntax of SQL language. The following is a quote from the interactive mode of MySQL, under which I've tried several commands. The database I was working on is named mysql, but the prompt of the interactive mode is also called mysql: mysql-select * -SELECT * -select * from mysql -SELECT * FROM mysql My purpose was just to look at the content of the database, mysql. There showed nothing, no matter how I tried using select or show. BTW, I'm just wondering does commands have to be small latters or big letters? Have a nice day Jack __ Get Your Private, Free Email at http://www.hotmail.com
Re: [SQL] a newbie's question on language syntax
On Thu, 26 Aug 1999, Jack Lee wrote: commands. The database I was working on is named mysql, but the prompt of the interactive mode is also called mysql: Be sure not to name your own databases mysql. That database is used by mysql to store its permissions information and things. mysql-select * -SELECT * -select * from mysql -SELECT * FROM mysql You have to put a semicolon (;) at the end of your statements. If you don't, it thinks you are entering a multiple line command. Also, you can't select from a database. Databases contain multiple tables; you have to select from the tables. So you could do: use mysql; select * from user ; That would give you a list of all the user accounts MySQL has (which don't correspond necessarily to user accounts on the system) provided you are logged onto MySQL as root. I think you have to use a commandline option to the mysql client for that, but I don't remember what it is. matter how I tried using select or show. BTW, I'm just wondering does commands have to be small latters or big letters? It doesn't matter. I know that SQL data is case sensitive, but I don't think any of the commands, nor the names of databases or tables, are case sensitive.