Home | About | Contact | Feed Subscription | Submit Article | Link exchange | Translate(google) to:





MySQL basic commands part 3


E-mail this post



Remember me (?)



All personal information that you provide here will be governed by the Privacy Policy of Blogger.com. More...



SELECT command is one of most common commands in MySQL. Its syntax is little more complex, but here we'll as all, present basic things...

SELECT atributes FROM table_or_tables WHERE condition;

More advanced purpose of this command we'll explain later in this post. For now, if there is some data that needs to be changed then we will use command:

UPDATE table SET atribute="value" WHERE condition;

For example lets try to correct value of height to 185 at person: edin bukva
in this example condition will consists of two parts because there are two people named edin. So for condidition we can use:
name='edin' and surname='bukva'
or just: surname='bukva' because there is only one man with bukva surname

UPDATE person SET height='185' WHERE name='edin' and surname='bukva';

In condition part we used "and" operator. It is normal to use these operators (and, or, etc...)

If we wanted to add new row (record) we would use this command:
INSERT INTO table VALUES('1st atribute value','2nd',...);
so on our example it would be like this:
INSERT INTO person VALUES('name1','surname1','180','78',NULL);

NULL for value means that there will be no value for that field.

You can see the procedure at whole image:


On pictures you can see that i have used SELECT * FROM person; command to list, so i could see what i have got.
-----------------------------
rest of basic stuff in part 4, until then...

other parts about MySQL:
MySQL basic commands part 1
MySQL basic commands part 2
MySQL basic commands part 4




0 Responses to “MySQL basic commands part 3”

Leave a Reply

      Convert to boldConvert to italicConvert to link

 




    Free Image Hosing :: www.slibe.com



History:

Graphics Cards

Introduction
History
Working Method
GPU
Video Memories
Arhitecture
Graphics card types
PCI

OpenGL

Introduction to OpenGL
OpenGL history
OpenGL vs. Direct3D
Fahrenheit
OpenGL tutorials

Computer Graphics

History of Computer Graphics
3D Terms
Computer Graphics part 1

Posts about Linux

Installing from source code
Konsole-Shell part 1
Novell SuSe Linux part 2 - Installing nvidia graphics drivers
Novell Suse 9.3 GNU/Linux part 1

Posts about MySQL

MySQL Basic Commands part 1
MySQL Basic Commands part 2
MySQL Basic Commands part 3
MySQL Basic Commands part 4

Other Posts

First Post

Archives:

Links:

  • Blogger Templates
  • Digital Computing Machines
  • Mysterie World
  • NeHe OpenGL


Copyleft 2006 :: The place where you can be free :: Beyond Computing | Mysterie World | Digital Computing Machines
Powered by Blogger, Blogger Beta, Blogger Templates and Slibe :: Free Image Hosting