GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Tech FAQs  >  SQL
Go To First  |  Previous Question  |  Next Question 
 SQL  |  Question 161 of 215    Print  
Print number of columns and column names
How to print the number of columns in a particular table also the column names without using JDBC Result set meta data using pure SQL code.


  
Total Answers and Comments: 1 Last Update: October 17, 2008     Asked by: bharaniprasanth 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
October 17, 2008 05:44:49   
nareannl Member Since: October 2008   Contribution: 1    

RE: Print number of columns and column names
select count(column_name) column_name from user_tab_columns where table_name 'tablename';
 
Is this answer useful? Yes | No

 Related Questions

Can we use aggregate function in another aggregate functionsuppose we got count of a column by using the group by clause so we get different counts in the same statement how to get the maximum of count
Read Answers (11) | Asked by : sahithi

How can i display a column name with a '-' sign. i.e by using concat sttle i can concat two column name but is there a possiblity to display column name as "EMPLOYEE -- ID"
Read Answers (2) | Asked by : Samuel

Hey there SQL MASTERS, here are some questions i was posed in an interview/assessment thing, dunno how well i did....Coud u answer these questions? i dont know how easy/difficut they are for u, all i know is that i had SERIOUS trouble with them! thanks alot!EMPLOYEEEmployee_id number NOT NULL (Primary Key)Employee_name VarChar(30) NOT NULL Dept_id number NOT NULL (Foreign Key to DEPARTMENT)Manager_id number NOT NULL (Foreign Key to EMPLOYMENT)Salary number
Read Answers (7) | Asked by : zen

In SQL, I'm analyzing a cluster for a san and I'm not sure if I'm doing it properly. If I ask how many transactions are too many, is there a straight answer? For instance, SQL trace monitored for 5 days, and found 37,405,636 transaction recorded, 0 errors, with 36,346,652 number of stored procedures executed. How does one tell if this is normal or not?
View Question | Asked by : Robin

1. why the performance of the table is degraded when more index is created on the table......2. whats the main usage of synonym other than that of creating other names to objects....3. shall we able to create an primary index on the table which already has the null value? if yes syntax please.........4. whats the main usage of trigger.......... (eg..) please...
Read Answers (3) | Asked by : karthe

Latest Answer : FOR EXAMPLE TO RETRIEVE 2ND COLUMN(ENAME)  IN EMP TABLE:SELECT COLUMN_NAME FROM USER_TAB_COLUMNSWHERE TABLE_NAME ='EMP'AND COLUMN_ID = 2 ...

Is it possible to insert a new column between two existing columns?for ex:i have a table with two cols:rollno and dateofbirth.suppose if i want a new column named 'name' to be included in between rollno and dateofbirth. is it possible.I know it is possible thro enterprise mgr. how to do using T-SQL
Read Answers (4) | Asked by : Krishnan

Select comm from emp; The Null column in the output will come in the last i.e at the end. WHY?e.g COMM 1200 1000 1300 1450 ---- (NULL) ---- (NULL)

1. No of User variables in sql*plus is ?2. User can have __ many number of variables per sql command.3. User can have__ many number of lines (assuming 80 characters per line) per sql command.4. The size of PL/SQL buffer in Oracle 7 is 2k and in Oracle6 is 512k oracle 9 is?
View Question | Asked by : SHASHIDHAR B.N

Latest Answer : SELECT to_char(to_date(24,'J'),'JSP')||' DOLLARS' FROM DUAL ...
Read Answers (2) | Asked by : Santosh


 Sponsored Links

 
Related Articles

Print Servers

Print Servers Print server is a server or advice that is used to connect many printers of a network to it Using the print server any computer on the network can give a print command to the server and the print server will get the job done accordingly Usually a print server is configured on a compute
 

jQuery - Column Highlighting

Learning jQuery Column Highlighting It can be a nice user interface enhancement to visually remind the user of what has been done in the past By highlighting the column that was most recently used for sorting we can focus the user s attention on the part of the table that is most likely to be releva
 

CSS3 Multi Column Feature

CSS3 Multi Column Feature CSS3 Multi Column Module is a vital feature present in CSS3 This feature enables users to flow the content of an element into multiple columns The CSS3 Multi Column Module is a important feature because it gives users the following features or advantages there is no need to
 

Report Builder 2.0 - Format a Column

Format a column based on some criterion In the above report in the third column there is a wide variation in the value of the rows. The purpose of this is to demonstrate using a condition in the expression. This section shows how you may use the Expression to set the color of that textbox based on t
 

Be Prepared for Tech Job Cuts

Even one of the most flourishing and possibly the strongest industries of the future are not experiencing the economic crunch. The tech industry is now experiencing massive job losses in different categories. Although you will still see innovations almost every day from the tech industry through th
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape