Re: Indices and Constraints.

2004-12-02 Thread SGreen
Those types of queries will be available soon as the INFORMATION_SCHEMA 
views are in development.  Keep your eyes on the next few releases of 
MySQL for this feature to appear (it may already be active in the 5.0.2 
release just announced but I haven't had time to check yet). Until then 
you will need to parse the results of SHOW CREATE TABLE just as everyone 
has already suggested.

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine


Roger Baklund <[EMAIL PROTECTED]> wrote on 12/02/2004 07:01:23 AM:

> [EMAIL PROTECTED] wrote:
> > Hi,
> > Thank you. But I want select the constraints and indices used on 
the
> > table. How can we get this information?. Please help me in this.
> 
> Ian gave you the answer:
> 
> > From: Ian Sales 
> [...]
> > - show indexes from DATABASE_NAME.TABLE_NAME
> 
> The syntax is: SHOW INDEX FROM tablename FROM dbname
> 
> > - or, show create table DATABASE_NAME.TABLE_NAME;
> 
> To elaborate: You can not use the SELECT statement to get this 
> information in MySQL, like you can in Oracle. In MySQL, you can only get 

> this information from other statements, like SHOW INDEX FROM ... and 
> SHOW CREATE TABLE.
> 
> http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html >
> http://dev.mysql.com/doc/mysql/en/SHOW_CREATE_TABLE.html >
> 
> -- 
> Roger
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
> 


Re: Indices and Constraints.

2004-12-02 Thread Roger Baklund
[EMAIL PROTECTED] wrote:
Hi,
Thank you. But I want select the constraints and indices used on the
table. How can we get this information?. Please help me in this.
Ian gave you the answer:
From: Ian Sales 
[...]
- show indexes from DATABASE_NAME.TABLE_NAME
The syntax is: SHOW INDEX FROM tablename FROM dbname
- or, show create table DATABASE_NAME.TABLE_NAME;
To elaborate: You can not use the SELECT statement to get this 
information in MySQL, like you can in Oracle. In MySQL, you can only get 
this information from other statements, like SHOW INDEX FROM ... and 
SHOW CREATE TABLE.

http://dev.mysql.com/doc/mysql/en/SHOW_INDEX.html >
http://dev.mysql.com/doc/mysql/en/SHOW_CREATE_TABLE.html >
--
Roger
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


RE: Indices and Constraints.

2004-12-02 Thread lakshmi.narasimharao

Hi,
Thank you. But I want select the constraints and indices used on the
table. How can we get this information?. Please help me in this.

Thanks,
Narasimha

-Original Message-
From: Ian Sales [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 02, 2004 5:07 PM
To: Lakshmi NarasimhaRao (WT01 - TELECOM SOLUTIONS)
Cc: [EMAIL PROTECTED]
Subject: Re: Indices and Constraints.

[EMAIL PROTECTED] wrote:

>Need to know the similar one in MySQL. Do we have views or any other
>system tables in MySQL 4.0.21 which OUTPUTS  the constraints and
indices
>in a particular table?
> 
>
- show indexes from DATABASE_NAME.TABLE_NAME

- or, show create table DATABASE_NAME.TABLE_NAME;

- ian



Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or [EMAIL 
PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Indices and Constraints.

2004-12-02 Thread Ian Sales
[EMAIL PROTECTED] wrote:
Need to know the similar one in MySQL. Do we have views or any other
system tables in MySQL 4.0.21 which OUTPUTS  the constraints and indices
in a particular table?
 

- show indexes from DATABASE_NAME.TABLE_NAME
- or, show create table DATABASE_NAME.TABLE_NAME;
- ian
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]


Re: Indices and Constraints.

2004-12-02 Thread electroteque
Thats usually setup in the same table schema no ?
On 02/12/2004, at 9:52 PM, <[EMAIL PROTECTED]> wrote:
Hi All,

In oracle I can query user_constraints, user_indexes for getting the
constraints and indices for a particular table.
User_constraints and user_idexes are view which holds all the
constraints and indices for a particular table.

Need to know the similar one in MySQL. Do we have views or any other
system tables in MySQL 4.0.21 which OUTPUTS  the constraints and 
indices
in a particular table?


Please reply ASAP.

Regards,
Narasimha
Ver: MYSQL 4.0.21


Confidentiality Notice
The information contained in this electronic message and any 
attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential 
or privileged information. If
you are not the intended recipient, please notify the sender at Wipro 
or [EMAIL PROTECTED] immediately
and destroy all copies of this message and any attachments.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]