March 2001
Intermediate to advanced
640 pages
14h 9m
English
| Q1: | Can I copy data from a table into itself using the INSERT command? In addition, I want to change the value of one column. |
| A1: | By using the INSERT statement with a SELECT statement, you can copy all the rows from the table into itself. However, you must modify the column in question as a separate step. You cannot update columns while performing this type of INSERT. The following code shows how to perform these tasks:
Insert customer_demo Select * from customer_demo Update customer_demo Set Addr2 = 'unavailable' |
| Q2: | You said that caution should be taken when using the INSERT, UPDATE, DELETE statements, but there seem to be some simple fixes to correct whatever I did wrong. Is this correct? |
| A2: | Yes. For example, a simple way to fix a misspelled ... |
Read now
Unlock full access