Hi,
I want to know ,what are the special characters which are restricted in vertica for creating tables.
Example : if I tried test.sub1 then it is showing error and same as test*sub1.
Please suggest .
Thanks
Ajit
What are the special characters restricted in Vertica?
Moderator: NorbertKrupa
-
- Newbie
- Posts: 15
- Joined: Tue May 14, 2013 1:25 pm
Re: What are the special characters restricted in vertica
Hello Ajit,
You need to follow the standard template while creating tables.
There is no other way you can use table names in CREATE TABLE statement
Can you elaborate on the error that you are getting.
You need to follow the standard template while creating tables.
Code: Select all
CREATE TABLE [ IF NOT EXISTS ] [[db-name.]schema.]table-name
(Column-definition
);
Can you elaborate on the error that you are getting.
Re: What are the special characters restricted in vertica
Hi!
Read here: https://my.vertica.com/docs/6.1.x/HTML/ ... m#8944.htm
Read here: https://my.vertica.com/docs/6.1.x/HTML/ ... m#8944.htm
Code: Select all
daniel=> create table "test.sub1" (id int);
CREATE TABLE
daniel=> create table "test*sub1" (id int);
CREATE TABLE
daniel=>
-
- Newbie
- Posts: 15
- Joined: Tue May 14, 2013 1:25 pm
Re: What are the special characters restricted in vertica
I am not saying about "test*sub1" i need test*sub1..
It is not possible ....
I need to know what are the special charaters restricted like (*)
It is not possible ....
I need to know what are the special charaters restricted like (*)
Re: What are the special characters restricted in vertica
ajit_nayak,
sKwa showed you how to create a table named test*sub1!
Just surround it in double quotes in your create table statement. But keep in mind, every time you refer to that table you'll have to use the double quotes...
sKwa showed you how to create a table named test*sub1!
Just surround it in double quotes in your create table statement. But keep in mind, every time you refer to that table you'll have to use the double quotes...
Code: Select all
dbadmin=> create table "test*sub1" (id int);
CREATE TABLE
dbadmin=> \d "test*sub1"
List of Fields by Tables
Schema | Table | Column | Type | Size | Default | Not Null | Primary Key | Foreign Key
--------+-------------+--------+------+------+---------+----------+-------------+-------------
public | "test*sub1" | id | int | 8 | | f | f |
(1 row)
dbadmin=> select * from "test*sub1";
id
----
(0 rows)
Thanks,
Juliette
Juliette