ITTreats.com
Enter your Search term and Hit "Enter"

Sat, 20 Mar 2010 12:24:05 PM +00:00


Retrieving Column Names of Table in MySQL, SQL Server

Retrieving Column Names of Table in MySQL, SQL Server
Posted on March 8th, 2009 in MYSQL by adrevol

When you do select query that will give you only records available,
in some conditions we may require Column names of table for dynamic query generating programs for that purpose here is the query for retrieving Column Names

In MySQL :

SHOW COLUMNS FROM <table name>

In SQLServer

Select column_name from information_schema.columns where table_name =<tablename>

for more infomation on table try with
select * from inormation_schema.columns where table_name=<table name

!!happy coding…!!


P.S. : Please post us Your Valuable Comments on this Article

Written by : adrevol
( Treats Given : 35 Treats Attended : )

Comments (1)


Fatal error: Call to undefined function wp_list_comments2() in /home/content/a/d/r/adrevol/html/ittreats/wp-content/themes/myfav/comments.php on line 26