test_table:
id f_name l_name age
-- --------- -------- ------
I am new to oracle, but if I want to select all the columns I should use
select * from test_table
however if I want to select all the columns except age I should write
select id, f_name, l_name from test_table
Is there a way I can select all the columns but disgarding a column or two?
Because in my work busninse there alot of columns and sometimes I don't need to select them all.
You can't.
The only thing that comes into my mind is to create a VIEW for your SELECT statement.
CREATE VIEW employeeList
AS
SELECT id, f_name, l_name -- <<== select only the column you want to project
FROM test_table;
once your VIEW is created, you can now use * against the view,
SELECT * FROM employeeList
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With