Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 查询以查找包括null在内的所有db参数值_Sql - Fatal编程技术网

Sql 查询以查找包括null在内的所有db参数值

Sql 查询以查找包括null在内的所有db参数值,sql,Sql,此查询是否获取表中参数不可用的所有值(包括null) select name,display_value from v$spparameter where nvl(name,'null') in( 'memory_target','sga_target','pga_aggregate_target','pga_aggregate_limit','db_cache_size', 'shared_pool_size','large_pool_size','result_cache_

此查询是否获取表中参数不可用的所有值(包括null)

select name,display_value 
from v$spparameter where nvl(name,'null') in(
    'memory_target','sga_target','pga_aggregate_target','pga_aggregate_limit','db_cache_size',
    'shared_pool_size','large_pool_size','result_cache_max_size','processes',
    'session_cached_cursors','open_cursors','db_securefile','cpu_count',
    'parallel_max_servers','job_queue_processes','log_buffer','_b_tree_bitmap_plans',
    'use_large_pages','audit_trail','nls_sort','plsql_code_type','resource_manager_plan',
    'shared_servers','max_shared_servers','dispatchers','event','undo_retention',
    '_highthreshold_undoretention','parallel_adaptive_multi_user','parallel_force_local',
    'db_files','db_performance_profile','_srvntfn_max_concurrent_jobs',
    '_optimizer_use_feedback','optimizer_dsdir_usage_control',
    '_sql_plan_directive_mgmt_control','_fix_control','global_txn_processes',
    '_disable_autotune_gtx', '_ges_server_processes','sga_max_size',
    '_securefiles_concurrency_estimate','streams_pool_size')
order by name;

您可以尝试在where caluse中添加
或name为null

因为SQL
NULL
不是一个值。您需要使用
IS NULL
来获取它


您可以尝试在where caluse中添加
或name为null

因为SQL
NULL
不是一个值。您需要使用
IS NULL
来获取它


差不多。您正在将null值转换为字符串“null”,但忘记将其包含在“in”列表中。只需在列表中添加“null”

select name,display_value 
from v$spparameter where nvl(name,'null') in('null',
    'memory_target','sga_target','pga_aggregate_target','pga_aggregate_limit','db_cache_size',
    'shared_pool_size','large_pool_size','result_cache_max_size','processes',
    'session_cached_cursors','open_cursors','db_securefile','cpu_count',
    'parallel_max_servers','job_queue_processes','log_buffer','_b_tree_bitmap_plans',
    'use_large_pages','audit_trail','nls_sort','plsql_code_type','resource_manager_plan',
    'shared_servers','max_shared_servers','dispatchers','event','undo_retention',
    '_highthreshold_undoretention','parallel_adaptive_multi_user','parallel_force_local',
    'db_files','db_performance_profile','_srvntfn_max_concurrent_jobs',
    '_optimizer_use_feedback','optimizer_dsdir_usage_control',
    '_sql_plan_directive_mgmt_control','_fix_control','global_txn_processes',
    '_disable_autotune_gtx', '_ges_server_processes','sga_max_size',
    '_securefiles_concurrency_estimate','streams_pool_size')
order by name;

差不多。您正在将null值转换为字符串“null”,但忘记将其包含在“in”列表中。只需在列表中添加“null”

select name,display_value 
from v$spparameter where nvl(name,'null') in('null',
    'memory_target','sga_target','pga_aggregate_target','pga_aggregate_limit','db_cache_size',
    'shared_pool_size','large_pool_size','result_cache_max_size','processes',
    'session_cached_cursors','open_cursors','db_securefile','cpu_count',
    'parallel_max_servers','job_queue_processes','log_buffer','_b_tree_bitmap_plans',
    'use_large_pages','audit_trail','nls_sort','plsql_code_type','resource_manager_plan',
    'shared_servers','max_shared_servers','dispatchers','event','undo_retention',
    '_highthreshold_undoretention','parallel_adaptive_multi_user','parallel_force_local',
    'db_files','db_performance_profile','_srvntfn_max_concurrent_jobs',
    '_optimizer_use_feedback','optimizer_dsdir_usage_control',
    '_sql_plan_directive_mgmt_control','_fix_control','global_txn_processes',
    '_disable_autotune_gtx', '_ges_server_processes','sga_max_size',
    '_securefiles_concurrency_estimate','streams_pool_size')
order by name;
既然nvl(名称,'null')将空值转换为字符串
'null'
,为什么不将
'null'
添加到列表中呢<代码>…在('null'、'memory\u target'、'sga\u target'、…)中nvl(名称,'null')的位置…您使用的是哪种dbms?(
NVL()
不是ANSI SQL。)既然NVL(名称,'null')将null转换为字符串
'null'
,为什么不将
'null'
添加到列表中呢<代码>…在('null'、'memory\u target'、'sga\u target'、…)中nvl(名称,'null')的位置…您使用的是哪种dbms?(
NVL()
不是ANSI SQL。)