Home > database >  Select * from table table, let a field value is empty
Select * from table table, let a field value is empty

Time:10-18

Help you a great god, and oracle database, I select * from table table, but want to make one of the value of the field display is empty, what function can be achieved with excuse me, don't have to decode the judgment,

CodePudding user response:

A field in a field to write, write the fields you can mark a NULL,,,

CodePudding user response:

reference 1st floor minsic78 response:
write a field in a field, wrote the fields you can mark a NULL,,,
this I've tried, use NULL as field, dozens of field... Too much trouble,

CodePudding user response:

refer to the second floor qq_40308063 response:
Quote: refer to 1st floor minsic78 response:

A field in a field to write, write the fields you can mark a NULL,,,
this I've tried, use NULL as field, dozens of field... Too much trouble,


This is the only way, dozens of fields, not much, what do you think of too much can use data dictionary user_tab_columns spell out first,

BTW: * this usage is to be avoided in the process of encoding,

CodePudding user response:

Table table has A, B, C three fields, I need to let the B field show empty,
SELECT A, ' 'B, C FROM the table.
Or
SELECT A, NULL B, C FROM the table;

CodePudding user response:

If it is only export the query results can connect several separator, such as use commas
The select col_1 | | ', '| | col_2 |',,,,,, '| | tab_txt from the table.
  • Related