How to update the date column of the table?
If column is date type
UPDATE TableName SET Updateable_Col =to_date('yourDate’,'MM/DD/YYYY') WHERE ColumnName ='Paramenter'.
or if column is string type
UPDATE TableName SET Updateable_Col =to_char('yourDate’,'MM/DD/YYYY') WHERE ColumnName ='Paramenter'.
Note:
1. To_date(‘Column Parameter’, ‘Date Format’) function converts a string to a Date.
2. To_Char(‘Column Parameter’, ‘Date Format’) function converts a Date to a String.
| Sno | Field Name | Used for |
| 1 | TableName | Table name, which table you want to update. |
| 2 | Updateable_Col | Column Name, which column you want to update |
| 3 | YourDate | Date as 06/25/2008 |
| 3 | ColumnName | In respect to which column you want to update |
0 comments:
Post a Comment