SAHABAT IKLAN 1 MALAYSIA:

Tuesday, September 20, 2011

How To Write an Informix SQL Update Command

Nama: Woody Allen
Email: sales@exabytes.com.my
Website: http://exabytes.my
Tajuk: How To Write an Informix SQL Update Command
Iklan: How To Write an Informix SQL Update Command

Informix, from IBM, is an RDBMS or a Relational Database Management System. And one of the most imperative commands used in IBM Informix is the SQL update command.

The SQL update command enables you to revise the database that you are currently working on. Hence, this command is very useful and important to know.

If you are to use Informix, here is how you can write an SQL update command:

Launch IBM Informix. Assuming that your computer is running on Windows operating system, go to the "Start" button on the lower left portion of your screen and click on it. Go to "All Programs" and select IBM Informix from the list of applications presented. This will launch a new window for IBM Informix.

Open your database. If you would like to work with an existing database, open that file first. Otherwise, if you want to create a new one, choose "New" from the menu to open a clean sheet.
Provide names for each table. For a new sheet, you will need to label the tables accordingly. This will help you and the application to determine which row needs to be updated later on. Make sure the labels are unique.

Start updating the data. Type in the word "update" plus the table name of the row you want to edit. This will trigger the SQL update command to work and go directly to the row you typed in. Then, type "set =". This command will enable you to change the content of the row selected. After the "=" sign, type the value you want to put on the row before you hit the "Enter" key. This will then insert the data you provided.

Update multiple rows. If you want to be able to update multiple rows, type "where" plus the condition of the rows you want to revise. Use the command "and" if there are two or more conditions that you want to use to update the data.

Go to the cells you want to update. As you have several rows and columns available, go to the row that you want to edit. This can be a single row or several rows at a time.
Revert back in case of an error. If you have provided an incorrect data and would like to revert to the previous value, you can use a rollback command by typing "begin work;"

Test your script if it works. Right after you hit the "Enter" key, in case there are no errors with your script, you should see a text informing you of how many rows were revised. Check the content of the rows and feel free to revert to the old values if there are incorrect data supplied. After you have verified the information, save your work by typing the string "commit work".

Be mindful of how you type the rows and conditions as it is quite common for people to update the wrong row. Especially if you are updating a huge table and revising several rows at a time, it is very hard to double-check and keep track of things.

Reposted by: Exabytes.my

www .Exabytes .com .my
Malaysia Web Hosting, Malaysia Dedicated Server Provider, Malaysia Domain Registration
Ip Pengirim: 202.186.61.30

No comments:

Post a Comment




WEBSITE IKLAN PERCUMA

BANNER SAHABAT