473,387 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SQL Query using user_tab_columns and user_col_comments

Hi,
I am using user_tab_columns and user_col_comments to get details about the table.

Here is my code:
select * from user_tab_columns where table_name='sample_table';

After running this query in TOAD/Oracle SQL plus, i get "no rows selected".

Sample table:

NAME AGE CUST_ID
---------- ---------- ----------
deepali 22 68162
hrishikesh 23 69876
prashant 25 78162

Please help me out.

Thanks,
Deepali
Sep 19 '07 #1
2 9244
amitpatel66
2,367 Expert 2GB
Hi,
I am using user_tab_columns and user_col_comments to get details about the table.

Here is my code:
select * from user_tab_columns where table_name='sample_table';

After running this query in TOAD/Oracle SQL plus, i get "no rows selected".

Sample table:

NAME AGE CUST_ID
---------- ---------- ----------
deepali 22 68162
hrishikesh 23 69876
prashant 25 78162

Please help me out.

Thanks,
Deepali
Hi Deepali,

Try using below Query:
Expand|Select|Wrap|Line Numbers
  1. SELECT * from all_tab_columns WHERE UPPER(table_name) = 'SAMPLE_TABLE';
  2.  
Sep 19 '07 #2
Try putting 'sample_table' in upper case, like this:

select *
from user_tab_columns
where table_name='SAMPLE_TABLE';
Mar 1 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: bdt513 | last post by:
I am trying to extract the values from a query using VBA. Specifically, I want to concatenate all the values of the "rosEmail" field from query "qselRosterEmailList" into one string (strEmails). I...
14
by: Darin | last post by:
I have a table that I want to delete specific records from based on data in other tables. I'm more familiar with Access '97, but am now using 2003, but the database is in 2000 format. In '97, I...
13
by: forbes | last post by:
Hi, I have a user that used the Query Wizard to create a query in Access. Now she claims that her master table is missing all the data that was excluded from the query. Can you create anything...
6
markmcgookin
by: markmcgookin | last post by:
Hi Folks, I am running a simple query using VB (This isnt a VB Question, dont worry!) on SQL Server Compact. I have the query below being created, and then added to if a flower location doesn't...
0
by: =?Utf-8?B?VG9ueSBBLg==?= | last post by:
I'm trying to develop a parameter query using Query Builder, the database is Access 2003. I placed a ? in the column to we quered and linked it to a checkbox on the form. When the user selects an...
1
by: EwanD | last post by:
I am trying to read through and process an Access Query using VBA. I have used the OpenRecordset method with parameters as below OpenRecordset(sSourceRecordset, dbOpenDynaset) Where...
6
by: TSIGOS1 | last post by:
Hello, I have created a query in Access and I want to be able to read the sql statement of the query using vba and then run it from excel vba. That is instead of copying and pasting all the query...
3
by: bdavid50 | last post by:
I have an ODBC to several tables in an Oracle 10g installation. I created an Access 2003 query using several of the tables from that ODBC. When I created it, it worked as expected and returned the...
2
by: tomric | last post by:
I have a question on passing data to the criteria of a parameter of a parameter query using VBA. I have a query set up that has ten different fields in it. One is field named “status”, this field...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.