Recently began to contact Oralce, organized a few recent SQL commands commonly used in PL
1. Modify the data in the table
write the query statement and condition, and then add "for Update", "for Update" is to get oacle Modify permission, execute this query statement, query the corresponding record
Select * from for UPDATE
2. Adding fields and annotations to a table
Alter Table Add VARCHAR2 (a); -- Add Field on column is ' Number of affairs '; -- Add Comment
3. modifying field data types
Alter Table Number (ten)
4. Know a field name, reverse lookup table containing this field
as follows, know the field name "Identity_type" and use the following statement to find out which table contains this field
SELECT * from WHERE = ' Gd_base ' and like ' identity_type% ';
5. When performing an update operation, if There is no commitat the bottom of the SQL statement, you will need to manually click the "Submit" button after execution
also Note When executing the SQL statement that the data to be updated is exactly the same as the fields that exist in the database
Some SQL commands commonly used in the Oralce database (add field annotations, modify data, and so on)