By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,948 Members | 852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,948 IT Pros & Developers. It's quick & easy.

Are queries different between sql and postgresql?

P: 4
Hi all,

I am a new member of this forum and looking for your support towards my discussion..

I want to know that the queries we are using in sql is entirely different postgresql?

And the second thing is in sql, we use "decription tablename" or "show columns from tablename" for collecting information about fieldnames of a table...

I have tried the same in postgresql for getting my field name but i am getting error message as "command not supported"..

Kindly forward me some more details regarding this...

thanks..
Kevin..
Aug 17 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 534
Welcome to the Forum, Kevin.

I think that when you say "sql" you actually mean MySQL database server.

Here are the things to remember:
SQL, as language, is defined by standards.
The original SQL standard was completed as a USA ANSI (American National Standards Institute) standard in 1986, and adopted as an ISO (International Standards Organization) standard in 1987. Expansions and revisions were released in 1989 and 1992.
Then there was SQL 1999, which was developed by the INCITS Technical Committee H2 on Database. This committee develops standards for the syntax and semantics of database languages.
Since then the SQL standard kept evolving, I think the latest draft (or standard?) is SQL 2003.

f you are really interested run a Qoogle serach for "sql standards" and you'll have enough papers to read for a very long time!

Any major database vendor provides SQL which for most parts is compliant with the SQL standard (one of them, anyway), but typically has something that's called "vendor extensions" - non-standard commands that they add for convenience.
Sometimes they also choose not to comply with the SQL standards, I think a good example would be how Oracle treats the NULL values.

I did not check, but I'm pretty sure that things like "show columns from tablename" are not coming from the SQL standards, these are vendor provided extensions, and as such can be different from one database to another.

The easiest way to display the table schema in PostgreSQL is to use the metacommand \d in psql.

You may also want to look at psql man page and at this posting for more info.
Aug 18 '07 #2

P: 4
Thank you michael for your informative reply...

The links you have guide me was useful to me,to understand my stance better..

keep the good work going...

regards,
kevin..
Aug 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.