473,405 Members | 2,421 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,405 software developers and data experts.

Retrieving Columns With Null Values

Hi All

How to retrieve all the null columns in a table using PL/SQL



Thanks in advance
Swetha
Sep 10 '07 #1
4 4955
amitpatel66
2,367 Expert 2GB
Hi All

How to retrieve all the null columns in a table using PL/SQL



Thanks in advance
Swetha
Make use of IS NULL Clause in WHERE condition to retrieve NULL columns from a particular table.

For Eg: SELECT * from <Table_Name> WHERE <Column_Name> IS NULL

You need not require PLSQL block here for this requirement. This can be achieved by a single SQL statement as shown above
Sep 10 '07 #2
hi amit

i tried this but the error message says"column_name" invalid identifire....i have a table with 175 columns and some columns among this is populated with null values.....i need to retrieve the column names which is populated with null data...

thanks
swetha

Make use of IS NULL Clause in WHERE condition to retrieve NULL columns from a particular table.

For Eg: SELECT * from <Table_Name> WHERE <Column_Name> IS NULL

You need not require PLSQL block here for this requirement. This can be achieved by a single SQL statement as shown above
Sep 10 '07 #3
amitpatel66
2,367 Expert 2GB
hi amit

i tried this but the error message says"column_name" invalid identifire....i have a table with 175 columns and some columns among this is populated with null values.....i need to retrieve the column names which is populated with null data...

thanks
swetha
Use the below query to get NULL column names of a particular table

Expand|Select|Wrap|Line Numbers
  1. select * from ALL_TAB_COLUMNS where table_name = '<table_name>' WHERE nullable = 'Y'
  2.  
Sep 10 '07 #4
hi amit,

Thank u so much...the query is working

regards
swetha
Use the below query to get NULL column names of a particular table

Expand|Select|Wrap|Line Numbers
  1. select * from ALL_TAB_COLUMNS where table_name = '<table_name>' WHERE nullable = 'Y'
  2.  
Sep 10 '07 #5

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

Similar topics

5
by: JackT | last post by:
Hi, I have the following SQL SELECT Table1.Col1, Table3.Col1 AS Expr1, COUNT(Table1.Col2) AS Col2_No, COUNT(Table1.Col3) AS Col3_No etc, FROM Table3 INNER JOIN Table2 ON...
17
by: Rico | last post by:
Hello, I am in the midst of converting an Access back end to SQL Server Express. The front end program (converted to Access 2003) uses DAO throughout. In Access, when I use recordset.AddNew I...
1
by: Olaf Rabbachin | last post by:
Hi folks, I'm looking for a way of retrieving the default-value of a table's field within an Access 2003 MDB. Any hints on how to accomplish this from ASP.Net? Thanks, Olaf -- My .02:...
9
by: serge | last post by:
/* Subject: How to build a procedure that returns different numbers of columns as a result based on a parameter. You can copy/paste this whole post in SQL Query Analyzer or Management Studio...
1
by: s.bussing | last post by:
Hi, I have been struggling with the GridView the whole day, but can not get this solved. The rowupdating event in my Gridview doesn't give me the new values only the old ones. In my GridView I...
2
by: BF | last post by:
Hi, I have some tables where I import data in, lots of field have gotten a NULL value which the application can not handle. Now can I replace each NULL value with '' in a columns with: update...
15
by: gunnar.sigurjonsson | last post by:
I´m having some problem retrieving identity value from my newly inserted row into a view. I have two tables T1 and T2 which I define as following CREATE TABLE T1 ( id BIGINT GENERATED ALWAYS...
1
by: Chris | last post by:
Hi, I'm using the following code DataTable tables = ((OleDbConnection)oleconn).GetOleDbSchemaTable( OleDbSchemaGuid.Tables, new object { null, null, null, "TABLE" }); foreach (DataRow r in...
2
by: =?Utf-8?B?aUhhdkFRdWVzdGlvbg==?= | last post by:
I have to retrieve the cloums from the table, but there are few columns in a table of datatype date and int and the default values are 9999-12-31 23:59:59.997 and -2147483648. My questions...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.