I have some questions:
1)How can I find data in an Oracle table and select it, but only the cell with this data to select not the entire row? And how can I select the next neighbour cell of this cell?
2)Is it possible to delete all columns from the table which don't have any data?
1. To see a cell you must specify both a column and row identifier (x,y coordinates). Relational databases are great matricies using the principles of linear algebra. Here's a typical 4GL SQL statement:
SELECT COLNAME FROM TABNAME WHERE CONDITION;
You replace COLNAME with a comma delimited list of column names in order to define your X axis points. You replace CONDITION with something to identify the rows you want, or Y axis points.
SELECT NAME FROM DEPARTMENTS WHERE CODE = 'SALES';
SELECT NAME FROM DEPARTMENTS WHERE DEPT_ID IS NOT 17;
2. A row can have many columns, so to delete a row with "no data" you must test each column for data and only delete rows where every column is null. Recall CONDITION from above: in SQL we use the WHERE clause to set conditions. For example,
DELETE FROM DEPARTMENTS WHERE DEPT_ID IS NULL AND CODE IS NULL AND NAME IS NULL AND LAST_UPDATED_TIME IS NULL AND .....;
In general never delete without a WHERE clause, because without a WHERE clause Oracle deletes all rows in the table. If you do this by accident, then immediately issue the command ROLLBACK and Oracle will undelete the data. Once you do a COMMIT it is really deleted.
The TRUNCATE TABLE X command also deletes all rows, whether empty or not, and it does an auto-commit at the end so there is no going back.