carlosarieira1 Posted December 18, 2012 at 09:42 PM Report #487744 Posted December 18, 2012 at 09:42 PM (edited) Alguem sabe de alguma consulta em sql, onde seja possivel ver quais sao os campos chaves de uma determinada tabela?? Edited December 18, 2012 at 09:43 PM by carlosarieira1
jsWizard Posted December 18, 2012 at 09:50 PM Report #487746 Posted December 18, 2012 at 09:50 PM information schema views: http://dev.mysql.com/doc/refman/5.0/en/information-schema.html key_column_usage inté!
HappyHippyHippo Posted December 18, 2012 at 09:52 PM Report #487747 Posted December 18, 2012 at 09:52 PM show keys from `tabela` IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
carlosarieira1 Posted December 18, 2012 at 09:55 PM Author Report #487748 Posted December 18, 2012 at 09:55 PM (edited) vou testar Sim funcionou mas nao da apenas para retiraro nome (Collun_name)?? Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_comment hotel 0 PRIMARY 1 CodHotel A 4 NULL NULL BTREE Edited December 18, 2012 at 09:56 PM by carlosarieira1
HappyHippyHippo Posted December 18, 2012 at 09:58 PM Report #487751 Posted December 18, 2012 at 09:58 PM information schema views: http://dev.mysql.com/doc/refman/5.0/en/information-schema.html key_column_usage inté! SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'base de dados' AND TABLE_NAME = 'tabela' AND COLUMN_KEY = 'PRI' IRC : sim, é algo que ainda existe >> #p@p Portugol Plus
jsWizard Posted December 18, 2012 at 10:18 PM Report #487759 Posted December 18, 2012 at 10:18 PM "não dês peixe.. ensina-os a pescar".. mas às vezes nem assim 😄
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now