Difference between revisions of "Scratch"

From WhyAskWhy.org Wiki
Jump to: navigation, search
m (Change lang from sql to mysql)
m (test)
Line 22: Line 22:
 
SELECT * FROM bath_towels;
 
SELECT * FROM bath_towels;
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
 +
Test text

Revision as of 21:03, 14 August 2012

# use the "my_database" database
USE my_database;

# show all "bath_towels" data
SELECT * FROM bath_towels;

# update specific fields in the "color" column
UPDATE bath_towels SET color = "Beige"
WHERE name = "Harvest";

UPDATE bath_towels SET color = "Blue"
WHERE name = "Dolphin";

UPDATE bath_towels SET color = "Lilac"
WHERE name = "Daisy";

UPDATE bath_towels SET name = "Tempest", color = "Maroon"
WHERE code = "821/9628";

# show all "bath_towels" data
SELECT * FROM bath_towels;


Test text