c*o
4 楼
you can try
show columns in table_name, for more information check the following page
http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
there should be one column which is designed for the keys
etc?
【在 I**A 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 如果有一个table books,怎么知道这个table有哪些columns, what is the key, etc?
show columns in table_name, for more information check the following page
http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
there should be one column which is designed for the keys
etc?
【在 I**A 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 如果有一个table books,怎么知道这个table有哪些columns, what is the key, etc?
t*a
5 楼
show create table books;
d*e
6 楼
Oracle:
最简单是 desc books,
或者 select * from user_tab_columns where table_name = 'BOOKS' 会详细一些。
key之类,可以用这个
select b.constraint_name, b.column_name, b.position
from user_constraints a, user_cons_columns b
where a.constraint_name = b.constraint_name
and a.table_name = 'BOOKS'
order by b.constraint_name, b.column_name, b.position;
其它的database,我想也有类似的
etc?
【在 I**A 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: 如果有一个table books,怎么知道这个table有哪些columns, what is the key, etc?
最简单是 desc books,
或者 select * from user_tab_columns where table_name = 'BOOKS' 会详细一些。
key之类,可以用这个
select b.constraint_name, b.column_name, b.position
from user_constraints a, user_cons_columns b
where a.constraint_name = b.constraint_name
and a.table_name = 'BOOKS'
order by b.constraint_name, b.column_name, b.position;
其它的database,我想也有类似的
etc?
【在 I**A 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: 如果有一个table books,怎么知道这个table有哪些columns, what is the key, etc?
I*A
7 楼
thank you all..
"user_tab_columns" is a keyword?
【在 d**e 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: Oracle:
: 最简单是 desc books,
: 或者 select * from user_tab_columns where table_name = 'BOOKS' 会详细一些。
: key之类,可以用这个
: select b.constraint_name, b.column_name, b.position
: from user_constraints a, user_cons_columns b
: where a.constraint_name = b.constraint_name
: and a.table_name = 'BOOKS'
: order by b.constraint_name, b.column_name, b.position;
: 其它的database,我想也有类似的
"user_tab_columns" is a keyword?
【在 d**e 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: Oracle:
: 最简单是 desc books,
: 或者 select * from user_tab_columns where table_name = 'BOOKS' 会详细一些。
: key之类,可以用这个
: select b.constraint_name, b.column_name, b.position
: from user_constraints a, user_cons_columns b
: where a.constraint_name = b.constraint_name
: and a.table_name = 'BOOKS'
: order by b.constraint_name, b.column_name, b.position;
: 其它的database,我想也有类似的
I*A
9 楼
en, this one would be the one that they want..
【在 c****o 的大作中提到】![](/moin_static193/solenoid/img/up.png)
: you can try
: show columns in table_name, for more information check the following page
: http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
: there should be one column which is designed for the keys
:
: etc?
【在 c****o 的大作中提到】
![](/moin_static193/solenoid/img/up.png)
: you can try
: show columns in table_name, for more information check the following page
: http://dev.mysql.com/doc/refman/5.0/en/show-columns.html
: there should be one column which is designed for the keys
:
: etc?
相关阅读
湾区招JAVA software engineer说好的老中帮老中呢【工作机会】湾区软件工程师实习Offer,Google or Facebook?申请今年H1B什么时候最晚交材料?有Solar公司的能推荐或提供内推吗我这种情况能negotiate G家的offer么?Amazon Bloomberg Indeed new grad offer诚心求比较,求在职前辈分享体验Onsite后写的Feedback会影响interviewer的决定吗?版主请封ID: cnmSingleton (MrSingleton臭傻逼)请问active clearance是什么?求yelp内推请问有人在Agilent工作吗?大家一般都是在哪个网站找工作信息一个35+的码工海归急问,应该再催下recruiter吗美国华人圈里的校友观念,是一大公害 (转载)请教一道题 median ii【海外党】Amazon安排Mar.23rd面试,还来得及办H1b吗求QA面经