推介:| Web Hosting | 外賣系統 | Server colocation | Web Shop System | Makeup course |

查看完整版本: 問MySQL

saihang 2007-4-2 09:00

問MySQL

想請問一0的My SQL statement應該點寫
1. 要0係Persons呢個table搵跟FirstName呢個field入面a字行頭0既所有columns
select * from Persons where FirstNmae = '???'
2.要0係成個database入面所有table,搵跟LastName呢個field入面由Hansen至Pettersen跟字母排序0既所有columns(或包括Hansen及Pettersen)
select * from ???;
3.要0係Persons呢個table跟FirstName呢個field排晒由z-a0既所有columns
select * from Persons ???;
4.0係Persons呢個table跟LastName呢個field將Hansen改成Nilsen
update ???;

tkor 2007-4-3 22:39

1. 要0係Persons呢個table搵跟FirstName呢個field入面a字行頭0既所有columns

SELECT * FROM Persons WHERE FirstName = '%a';

4.0係Persons呢個table跟LastName呢個field將Hansen改成Nilsen

UPDATE Persons SET LastName = 'Nilsen' WHERE LastName = 'Hansen';

tkor 2007-4-3 22:39

1. 要0係Persons呢個table搵跟FirstName呢個field入面a字行頭0既所有columns

SELECT * FROM Persons WHERE FirstName = '%a';

4.0係Persons呢個table跟LastName呢個field將Hansen改成Nilsen

UPDATE Persons SET LastName = 'Nilsen' WHERE LastName = 'Hansen';

tkor 2007-4-4 00:49

For 1, should be

SELECT * FROM Persons WHERE FirstName LIKE 'a%';

forgo 2007-4-10 22:49

以上回答正确~~~~~~~~~~~~~~~~~~
頁: [1]
查看完整版本: 問MySQL