d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Iso Mysql Knowledge And/or Help > Will Buy Fg To Support Payment For Help
Add Reply New Topic New Poll
Member
Posts: 5,858
Joined: Apr 8 2006
Gold: 29,535.00
Aug 12 2012 07:15pm
I would like someone experienced with MYSQL to look over the 5 Statements and either help me with them or show me some insight on how to get started with 1-5. I will pay very good, I need to get this done within the next couple of days. I will purchase fg to pay for whatever it takes, i am desperate here. Thanks in advance, Brock101

Write SELECT statements for the following questions:

Display all columns and all rows from the Employees table.
9 rows returned
Display the regionid, regiondescription for all rows in the Regions table.
4 rows returned
Modify query 2 so that the column headings are as follows:
"ID" and "Description"
4 rows returned
Display the customer ID, customer name, and region for all customers.
91 rows returned
Display the customer ID, customer name, and region for all customers.
Name the columns "ID," "Name," and "Region" (respectively), and sort the data by the company name.
91 rows returned

So far from my experience this is what I have come up for as what a Select Statement sort of contains, I could be wrong.

The syntax would be SELECT [column] FROM [table]
So let's say I was selecting a column callled "Birthday" from a table named "People" , it would be :
SELECT Birthday
FROM People
with multiple columns, you need to use a comma
EXAMPLE:
SELECT, first_name, Birtday
FROM People

Now I just need to put that knowledge to solve the 5 statements above, can anyone help me with this please ?

This post was edited by brock101 on Aug 12 2012 07:33pm
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Aug 12 2012 07:18pm
Quote
The syntax would be SELECT [column] FROM [table]
So let's say I was selecting a column callled "Birthday" from a table named "People" , it would be :
SELECT Birthday
FROM People
with multiple columns, you need to use a comma
EXAMPLE:
SELECT, first_name, Birtday
FROM People


that's all you need bro. list out whichever column they're asking for. and execute the actual queries until it matches what they want.

/edit: i hope nobody gives him the actual answers. this is the most basic thing you can do in sql, and he needs to really understand this or he'll suffer in his class. he's got several days to figure it out. if you want help, show us what your sql looks like, if theres any errors, and what your results look like

This post was edited by carteblanche on Aug 12 2012 07:20pm
Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 12 2012 07:19pm
SELECT * FROM [table] returns all columns and rows.

SELECT RegionID AS ID, regiondescription AS Desciption FROM Regions

SELECT CustomerID AS ID, CustomerName AS Name, Region AS Region FROM Customers

Member
Posts: 789
Joined: Jan 21 2006
Gold: 22.00
Aug 12 2012 07:29pm
Quote (koa_wolf @ Aug 12 2012 05:19pm)
SELECT * FROM [table] returns all columns and rows.

SELECT RegionID AS ID, regiondescription AS Desciption FROM Regions

SELECT CustomerID AS ID, CustomerName AS Name, Region AS Region FROM Customers



forgot something sorry

SELECT CustomerID AS ID, CustomerName AS Name, Region AS Region FROM Customers ORDER BY CompanyName


The word AS Just renames the column, take it out for the ones that don't require the changed names.
Member
Posts: 5,858
Joined: Apr 8 2006
Gold: 29,535.00
Aug 12 2012 07:36pm
Quote (koa_wolf @ Aug 12 2012 08:29pm)
forgot something sorry

SELECT CustomerID AS ID, CustomerName AS Name, Region AS Region FROM Customers ORDER BY CompanyName


The word AS Just renames the column, take it out for the ones that don't require the changed names.



I am sorry this is probably a stupid question but I do not understand the Returned shit.
Member
Posts: 827
Joined: Jan 16 2012
Gold: 0.00
Warn: 10%
Aug 13 2012 07:24am
Quote (koa_wolf @ Aug 12 2012 11:19pm)
SELECT * FROM [table] returns all columns and rows.

SELECT RegionID AS ID, regiondescription AS Desciption FROM Regions

SELECT CustomerID AS ID, CustomerName AS Name, Region AS Region FROM Customers


Did you read carterblanch answer about not giving straight answers or are you blind? -__________-"
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll