[SQL] About "Alter table... alter column.. TYPE ... "

2005-04-18 Thread Ying Lu
Hello, To alter table column from varchar(32) to date. "Alter table" command does not seem to work: alter table test alter column col type date ; ERROR: column "col1" cannot be cast to type "date" Tks, Emi ---(end of broadcast)--- TIP 7: don't for

[SQL] SQL command Error: "create table ... Like parentTable including defaults"

2005-05-27 Thread Ying Lu
Greetings, I have a simple question about SQL command : create table tableName1 LIKE parentTable INCLUDING defaults ; I was trying to create table "tableName1" with the same structure as "parentTable" without any data. I got a syntax error: 'syntax error at or near "like" ... ' I guess t

[SQL] Index creation question for expression (col1 || '-' || col2)

2005-07-08 Thread Ying Lu
Greetings, A question about creating index for the following expression. CREATE INDEX idx_t1 ON test (col1 || '-' || col2); May I know is it possible and how I may create index for the expression such as "col1 || '-' || col2" for a table please? Thanks a lot, Emi -

Re: [SQL] Index creation question for expression (col1 || '-' ||

2005-07-08 Thread Ying Lu
On Fri, Jul 08, 2005 at 12:08:41PM -0400, Ying Lu wrote: CREATE INDEX idx_t1 ON test (col1 || '-' || col2); May I know is it possible and how I may create index for the expression such as "col1 || '-' || col2" for a table please? "The syntax o

[SQL] About retrieving objects' priviledge info such as grantee & its privileges for a specific object (view, table, function, etc.)

2005-07-18 Thread Ying Lu
Hello, May I know the commands to retrieve objects' privileges info please? Something like: Object Type, Object name,creator,grantee, privilege, is_creatable = table T1