Most Used SQL Query used in current job ?
Jul 8, 2021
Query all the records from the table substitute_details
select * from SUBSTITUTE_DETAIL where user_id=’userid’;
- Query records from the substitute_details table where user_id =123 and application key is default means multiple conditions in where clause
select * from SUBSTITUTE_DETAIL where user_id=’123’ and application_key=’default’ ;
- Query to update the date using SQL in Oracle database
update TABLE_NAME
SET START_DATE=TO_DATE(‘06/07/2021’, ‘DD/MM/YYYY’), END_DATE=TO_DATE(‘07/07/2021’, ‘DD/MM/YYYY’)
WHERE USER_ID=’userID’ AND APPLICATION_KEY=’default’;
- Get all the columns from the table Substitute_Details with the type of each column .
select * from ALL_TAB_COLUMNS
where
table_name=’SUBSTITUTE_DETAIL’;UPDATE PASOFDATE SET ASOFDATE = TO_DATE('11/21/2012', 'MM/DD/YYYY');