创建一个带有球员号码,球员名字,球员位置,入队时间,球队名称,球队代号,球员年薪的数据库表并且插入30个数据
时间: 2024-03-25 13:39:14 浏览: 69
创建一个数据库
好的,我理解了你的问题。以下是创建一个包含球员号码,球员名字,球员位置,入队时间,球队名称,球队代号,球员年薪的数据库表的 SQL 语句:
```sql
CREATE TABLE players (
player_id INT PRIMARY KEY,
player_name VARCHAR(50),
player_position VARCHAR(50),
joining_date DATE,
team_name VARCHAR(50),
team_code VARCHAR(10),
player_salary INT
);
```
接下来,我会生成30个数据并插入到这个表中:
```sql
INSERT INTO players (player_id, player_name, player_position, joining_date, team_name, team_code, player_salary) VALUES
(1, 'LeBron James', 'SF', '2018-07-01', 'Los Angeles Lakers', 'LAL', 37436858),
(2, 'Kevin Durant', 'SF', '2019-07-01', 'Brooklyn Nets', 'BKN', 37199000),
(3, 'Stephen Curry', 'PG', '2017-07-01', 'Golden State Warriors', 'GSW', 37457154),
(4, 'Kawhi Leonard', 'SF', '2019-07-10', 'Los Angeles Clippers', 'LAC', 32742000),
(5, 'James Harden', 'SG', '2017-07-01', 'Houston Rockets', 'HOU', 37800000),
(6, 'Kyrie Irving', 'PG', '2019-07-01', 'Brooklyn Nets', 'BKN', 32742000),
(7, 'Chris Paul', 'PG', '2018-07-01', 'Oklahoma City Thunder', 'OKC', 38506482),
(8, 'Russell Westbrook', 'PG', '2018-07-01', 'Houston Rockets', 'HOU', 38506482),
(9, 'Paul George', 'SF', '2019-07-01', 'Los Angeles Clippers', 'LAC', 33005556),
(10, 'Jimmy Butler', 'SF', '2019-07-01', 'Miami Heat', 'MIA', 32742000),
(11, 'Klay Thompson', 'SG', '2019-07-01', 'Golden State Warriors', 'GSW', 32742000),
(12, 'Kemba Walker', 'PG', '2019-07-01', 'Boston Celtics', 'BOS', 32742000),
(13, 'Blake Griffin', 'PF', '2018-07-01', 'Detroit Pistons', 'DET', 34449964),
(14, 'Damian Lillard', 'PG', '2019-07-01', 'Portland Trail Blazers', 'POR', 29802321),
(15, 'Nikola Jokic', 'C', '2018-07-01', 'Denver Nuggets', 'DEN', 29542010),
(16, 'Joel Embiid', 'C', '2018-07-01', 'Philadelphia 76ers', 'PHI', 29542010),
(17, 'Ben Simmons', 'PG', '2019-07-01', 'Philadelphia 76ers', 'PHI', 29250000),
(18, 'Devin Booker', 'SG', '2018-07-01', 'Phoenix Suns', 'PHX', 27250000),
(19, 'John Wall', 'PG', '2019-07-01', 'Washington Wizards', 'WAS', 37800000),
(20, 'Bradley Beal', 'SG', '2019-07-01', 'Washington Wizards', 'WAS', 27734405),
(21, 'Mike Conley', 'PG', '2019-07-06', 'Utah Jazz', 'UTA', 32511623),
(22, 'Donovan Mitchell', 'SG', '2020-11-22', 'Utah Jazz', 'UTA', 5285000),
(23, 'Rudy Gobert', 'C', '2016-10-31', 'Utah Jazz', 'UTA', 25008427),
(24, 'DeMar DeRozan', 'SG', '2018-07-13', 'San Antonio Spurs', 'SAS', 27739975),
(25, 'LaMarcus Aldridge', 'PF', '2015-07-09', 'San Antonio Spurs', 'SAS', 24000000),
(26, 'Luka Doncic', 'SG', '2018-06-21', 'Dallas Mavericks', 'DAL', 9470400),
(27, 'Kristaps Porzingis', 'PF', '2019-02-01', 'Dallas Mavericks', 'DAL', 29000000),
(28, 'Deandre Ayton', 'C', '2018-06-21', 'Phoenix Suns', 'PHX', 9052920),
(29, 'Ja Morant', 'PG', '2019-06-20', 'Memphis Grizzlies', 'MEM', 9293640),
(30, 'Zion Williamson', 'PF', '2019-06-20', 'New Orleans Pelicans', 'NOP', 10245480);
```
请注意,这里的数据仅供示例,实际数据可能会有所不同。
阅读全文