LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2004, 10:54 PM   #1
mkrishnanand
LQ Newbie
 
Registered: Mar 2004
Location: Chennai
Posts: 7

Rep: Reputation: 0
Displaying the table definition on Postgres


Hi,

I want to create a table on Postgres based on another table and I did that using create table as select * .... but my requirement is I want to change the datatype of one particular column on the newly created table whether thats possible. If yes means how to change that. Any help is appreciated.

Regds

Krishna
 
Old 08-18-2004, 03:51 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
alter table change column_name column_name varchar(150)
If you want to change the datatype to varchar(150).

I'm also moving this thread to the Programming forum, as that's the right place for SQL related questions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
create table in postgres database kranti Linux - Newbie 1 11-15-2005 06:52 PM
Need a Definition dudeman41465 Linux - Software 2 11-07-2005 05:07 AM
DISK_ERR1 - definition? Risc91 AIX 2 10-28-2004 03:48 PM
MySQL non-realtime table-by-table mirroring Passive Linux - Software 1 01-20-2004 12:11 PM
How to import MS ACCESS Table including OLE filed into the MySQL Table ? myunicom Linux - General 1 11-28-2003 11:30 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration