Skip to content

Instantly share code, notes, and snippets.

@jbnv
Created June 2, 2015 01:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jbnv/ac7b474ae5b932f0929a to your computer and use it in GitHub Desktop.
Save jbnv/ac7b474ae5b932f0929a to your computer and use it in GitHub Desktop.
Name Generator (SQL Server; Spanish)
SELECT
ROW_NUMBER() OVER (ORDER BY surnames.[Surname],firstNames.[FirstName]) AS [Ordinal],
firstNames.[Gender],
firstNames.[FirstName],
surnames.[Surname]
FROM (
SELECT 'M' AS [Gender], [FirstName]
FROM (
SELECT 'Alberto' AS [FirstName]
UNION SELECT 'Angel' UNION SELECT 'Benito' UNION SELECT 'Carlos' UNION SELECT 'Domingo' UNION SELECT 'Fernando' UNION SELECT 'Federico' UNION SELECT 'Fidel'
UNION SELECT 'Gabriel' UNION SELECT 'Geraldo' UNION SELECT 'Gerardo' UNION SELECT 'Hernando'
UNION SELECT 'Javiar' UNION SELECT 'Jesus' UNION SELECT 'Jose' UNION SELECT 'Juan' UNION SELECT 'Julio'
UNION SELECT 'Mario' UNION SELECT 'Martin' UNION SELECT 'Mateo' UNION SELECT 'Miguel' UNION SELECT 'Pedro' UNION SELECT 'Rafael' UNION SELECT 'Roberto' UNION SELECT 'Raul'
UNION SELECT 'Salvador' UNION SELECT 'Sancho' UNION SELECT 'Velasco' UNION SELECT 'Vicente'
) maleNames
UNION SELECT 'F' AS [Gender], [FirstName]
FROM (
SELECT 'Angela' AS [FirstName]
UNION SELECT 'Benita' UNION SELECT 'Beatriz' UNION SELECT 'Carla' UNION SELECT 'Donna' UNION SELECT 'Dora' UNION SELECT 'Gabriela' UNION SELECT 'Gloria'
UNION SELECT 'Julia' UNION SELECT 'Lisa' UNION SELECT 'Maria' UNION SELECT 'Monica' UNION SELECT 'Nana' UNION SELECT 'Veronica'
) femaleNames
) firstNames
CROSS JOIN (
SELECT 'Alonso' AS [Surname]
UNION SELECT 'Alvarez' UNION SELECT 'Benitez' UNION SELECT 'Blanco' UNION SELECT 'Calvo' UNION SELECT 'Cano' UNION SELECT 'Castillo' UNION SELECT 'Castro' UNION SELECT 'Cruz'
UNION SELECT 'Delgado' UNION SELECT 'Diaz' UNION SELECT 'Diez' UNION SELECT 'Dominguez' UNION SELECT 'Hernandez' UNION SELECT 'Iglesias'
UNION SELECT 'Fernandez' UNION SELECT 'Garcia' UNION SELECT 'Garrido' UNION SELECT 'Gil' UNION SELECT 'Gomez' UNION SELECT 'Gonzalez' UNION SELECT 'Gutierrez'
UNION SELECT 'Jimenez' UNION SELECT 'Lopez' UNION SELECT 'Marin' UNION SELECT 'Martin' UNION SELECT 'Martinez' UNION SELECT 'Medina' UNION SELECT 'Molina' UNION SELECT 'Morales' UNION SELECT 'Moreno' UNION SELECT 'Munoz'
UNION SELECT 'Navarro' UNION SELECT 'Nunez' UNION SELECT 'Ortega' UNION SELECT 'Ortiz' UNION SELECT 'Pena' UNION SELECT 'Perez' UNION SELECT 'Prieto' UNION SELECT 'Quinto'
UNION SELECT 'Ramirez' UNION SELECT 'Ramos' UNION SELECT 'Rodriguez' UNION SELECT 'Romero' UNION SELECT 'Rubio' UNION SELECT 'Ruiz'
UNION SELECT 'Saldano' UNION SELECT 'Sanz' UNION SELECT 'Sanchez' UNION SELECT 'Santos' UNION SELECT 'Serrano' UNION SELECT 'Sixto'
UNION SELECT 'Suarez' UNION SELECT 'Torres' UNION SELECT 'Vazquez' UNION SELECT 'Velasquez'
) surnames
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment