1
CREATE TABLE Table1
(`id` int, `group_id` int, `data_id` int, `value` varchar(19))
;
INSERT INTO Table1
(`id`, `group_id`, `data_id`, `value`)
VALUES
(1, 20, 15, 'Supplier'),
(2, 20, 1, 'Rahul'),
(3, 20, 2, 'Sharma'),
(4, 20, 3, '05/08/90'),
(5, 20, 4, 'india'),
(6, 21, 15, 'Consumer'),
(7, 21, 1, 'Rajesh'),
(8, 21, 2, 'Sharma'),
(9, 21, 3, '05/08/88'),
(10, 21, 4, 'india')
;
創建表,現在我一張由供應商或消費者價值觀列數據排序是這樣的: 對於消費者:這可以在my-sql中完成嗎?
f-name l-name dob location
-----------------------------------
Rajesh Sharma 05/08/88 india
and so on ....
對於供應商
f-name l-name dob location
-----------------------------------
Rahul Sharma 05/08/90 india
它必須是不同的列? –
否插件是由插件生成的,插入的值是否可以根據消費者和供應商對數據進行排序? – puneet
看看這對你是否有好處:http://sqlfiddle.com/#!2/44e9e/13 –