Beginning SQL
Beginning SQL Beginning SQL
Appendix B 422 Now you need to insert some data. You can either use the interactive screen to insert data one statement at a time, clicking Execute after each statement, or you can click the Script tab and enter all the statements at once, making sure that you put a semicolon after each. There are two records to be inserted: INSERT INTO MyTable(MyColumn) VALUES(123); INSERT INTO MyTable(MyColumn) VALUES(888); Enter the code into the Command window and click Execute. Note that you must have previously executed a CONNECT TO statement, either in the Interactive screen or in the Script screen, before you can execute SQL against the database. To see what data is in the MyTable, return to the Interactive screen and type the following SQL in the SQL entry box: SELECT * FROM MyTable Click Execute, and you should see a screen similar to what appears in Figure B-51: Figure B-51
- Page 834: For this book, the default option o
- Page 838: Now click Next to continue. In the
- Page 842: Click Finish, and congratulate your
- Page 846: Figure B-22 Click Ignore to continu
- Page 850: Figure B-26 Click the Add New Conne
- Page 854: Figure B-29 Click the triangle next
- Page 858: Installing and Using IBM DB2 A free
- Page 862: Figure B-34 The default option of T
- Page 866: Click Next to continue to the conta
- Page 870: The screen in Figure B-42 allows yo
- Page 874: Figure B-45 Figure B-46 Setting Up
- Page 878: Figure B-48 Setting Up and Using th
- Page 882: Figure B-50 You must reconnect to t
- Page 888: Appendix B 424 In Access it’s not
- Page 892: Appendix B 426 Figure B-56 You need
- Page 896: Appendix B 428 Then click the Run i
- Page 900: Appendix B 430 The next screen (see
- Page 904: Appendix B 432 On the next screen,
- Page 908: Appendix B 434 Click Next to procee
- Page 912: Appendix B 436 Figure B-72 The huge
- Page 916: Appendix B 438 Figure B-74 Notice t
- Page 920: Appendix B 440 Figure B-76 The Obje
- Page 924: Appendix B 442 Figure B-78 Chapter
- Page 928: Appendix B You don’t need MyTable
- Page 932: Appendix B 446 Figure B-82 To begin
Appendix B<br />
422<br />
Now you need to insert some data. You can either use the interactive screen to insert data one statement<br />
at a time, clicking Execute after each statement, or you can click the Script tab and enter all the statements<br />
at once, making sure that you put a semicolon after each. There are two records to be inserted:<br />
INSERT INTO MyTable(MyColumn) VALUES(123);<br />
INSERT INTO MyTable(MyColumn) VALUES(888);<br />
Enter the code into the Command window and click Execute. Note that you must have previously executed<br />
a CONNECT TO statement, either in the Interactive screen or in the Script screen, before you can<br />
execute <strong>SQL</strong> against the database.<br />
To see what data is in the MyTable, return to the Interactive screen and type the following <strong>SQL</strong> in the<br />
<strong>SQL</strong> entry box:<br />
SELECT * FROM MyTable<br />
Click Execute, and you should see a screen similar to what appears in Figure B-51:<br />
Figure B-51