Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Add More Data to the Testing Table
How To Add More Data to the Testing Table? - MySQL FAQs - SQL SELECT Query Statements with GROUP BY
✍: FYIcenter.com
If you want to continue with other tutorial exercises in this FAQ collection, you need to add more data to the testing table. Follow the script below to add a new column and :
mysql> ALTER TABLE fyi_links ADD COLUMN tag VARCHAR(8); mysql> UPDATE fyi_links SET tag = 'DEV' WHERE id = 101; mysql> UPDATE fyi_links SET tag = 'DBA' WHERE id = 102; mysql> UPDATE fyi_links SET tag = 'SQA' WHERE id = 103; mysql> INSERT INTO fyi_links VALUES (104, 'www.mysql.com', '', '0', '2006-01-01', 'DBA'); mysql> INSERT INTO fyi_links VALUES (105, 'www.oracle.com', '', '0', '2005-01-01', 'DBA'); mysql> INSERT INTO fyi_links VALUES (106, 'www.php.net', '', '0', '2004-01-01', 'DEV'); mysql> INSERT INTO fyi_links VALUES (107, 'www.winrunner.com', '', '0', '2003-01-01', 'SQA'); mysql> UPDATE fyi_links SET counts = FLOOR(RAND()*10); mysql> SELECT id, url, counts, DATE(created), tag FROM fyi_links; +-----+-------------------+--------+---------------+------+ | id | url | counts | DATE(created) | tag | +-----+-------------------+--------+---------------+------+ | 101 | dev.fyicenter.com | 4 | 2006-04-30 | DEV | | 102 | dba.fyicenter.com | 3 | 2006-07-01 | DBA | | 103 | sqa.fyicenter.com | 6 | 2006-07-01 | SQA | | 104 | www.mysql.com | 1 | 2006-01-01 | DBA | | 105 | www.oracle.com | 7 | 2005-01-01 | DBA | | 106 | www.php.net | 4 | 2004-01-01 | DEV | | 107 | www.winrunner.com | 8 | 2003-01-01 | SQA | +-----+-------------------+--------+---------------+------+ 7 rows in set (0.00 sec)
2007-05-11, 4771👍, 0💬
Popular Posts:
What Happens If a Hyper Link Points to a Music File? - XHTML 1.0 Tutorials - Understanding Hyper Lin...
Which are the various programming approaches for WCF?
What's the output of the following program? And why? #include main() { typedef union { int a; char b...
Can a variable be both const and volatile? Yes. The const modifier means that this code cannot chang...
What will be printed as the result of the operation below: main() { int x=20,y=35; x=y++ + x++; y= +...