Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

author
message
[Level:0]cristiroma

Post subject: SHOW CREATE TABLE Support

registered: 02/28/2011

IP: *.136.150.117

views: 8

I need to extract the table definition from SQL, is there support for this? In MySQL I would use SHOW CREATE TABLE.

I looked into the documentation, but I only found support for SHOW CREATE VIEW functionality.


I've found out that for 8.4.0 is not supported, but I cannot find the "New features" for 8.4.1. Could you please point out the correct link?


Thanks,

Cristian

Quote
[Level:8]CUBRID

# Post subject:Re: SHOW CREATE TABLE Support

profile

registered: 03/28/2010

IP: *.91.139.82

Hello Cristian,

The same question has been already answered. Please see How do I SHOW CREATE TABLE in CUBRID? If you have questions, CUBRID Q&A site is more appropriate, while the forum is great for discussing certain issues. Do not hesitate to ask questions there.

Quote
[Level:0]cristiroma

# Post subject:Re: SHOW CREATE TABLE Support

profile

registered: 02/28/2011

IP: *.9.55.194

Hi,


Yes, I saw that too, sorry for not mentioning. 

The problem is that I do not want to add another dependecy to the project, such as PDO which is required to have that function available. But I think I came up with another solution.


Instead of using that, I think I can use SHOW COLUMN statement, which is documented here: http://www.cubrid.org/manual/840/en/SHOW%20COLUMN%20Statement In this way I can extract all the information I need and bake the CREATE TABLE statement myself. The only think I will miss will be the indexes, but that is not important for now.


I started some checks last night and I will investigate this further. Btw, do you have any information in which CUBRID version will we have this feature available?


Best,

Cristian

Quote
[Level:8]CUBRID

# Post subject:Re: SHOW CREATE TABLE Support

profile

registered: 03/28/2010

IP: *.91.139.82

Instead of SHOW COLUMN approach there is a better solution. Just use cubrid_schema() PHP function. It will return the full information including column types, constraints, indexes, primary keys, etc.

SHOW CREATE TABLE will not be in the upcoming apricot (8.5.0?) release, but likely in the next one after it.

To see what will be new in the apricot version, see the SPEC at http://sourceforge.net/apps/trac/cubrid/wiki.

Quote
[Level:8]CUBRID

# Post subject:Re: SHOW CREATE TABLE Support

profile

registered: 03/28/2010

IP: *.181.249.254

Hello Christian,

CUBRID 9.0 now supports "SHOW CREATE TABLE" statement. Here is the SHOW CREATE TABLE manual page.

The CUBRID Team

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: