Re: how to recall the initial definition (CREATE TABLE) of a table ?
От | Andrew Chambers |
---|---|
Тема | Re: how to recall the initial definition (CREATE TABLE) of a table ? |
Дата | |
Msg-id | 20060109182844.GA11970@yapgi обсуждение исходный текст |
Ответ на | Re: how to recall the initial definition (CREATE TABLE) of a table ? (<Amit_Wadhwa@Dell.com>) |
Список | pgsql-novice |
Sorry for replying to this message. I din't seem to get the first one. > Hello all at PG, > > Let's say I forgot the "definition" of a table (.. the original CREATE > TABLE query)... > > how do I ask PG to tell me these definition's (int not null, text, > foreign key, etc) ?? When in psql you can use the \d command to display the definition of any table. You can also use \? to see what other commands are available. > "definition" is not the correct word for this, is it ? what's the > correct term ? I think "definition" is ok. That's what I'd call it. > PS: ok, maybe I should go back to my SQL books... Your SQL books might not help in this situation because queries of this type are usually dependent on the client/server you are using (for example the Oracle version of what you're looking for is desc <table_name>). However, as always, Google is your friend - as are the documentation pages of the database you're using. Postgresql's happen to be very good http://www.postgresql.org/docs/8.1/static/ Regards, Andy
В списке pgsql-novice по дате отправления: