Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nate Allen
committed
May 9, 2012
1 parent
721b474
commit 7c5b00e
Showing
4 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,26 @@ | ||
<div class="container-fluid"> | ||
<div class="span6"> | ||
<body> | ||
<h2>Welcome to TrySQL!</h2> | ||
<h3>Welcome to TrySQL!</h3> | ||
<p> | ||
Just by arriving at this page, you've begun your first step on the road to database mastery. The goal of this website is to take you through some basic tutorials, giving you a general feel of how Structured Query Language works. The scope of this tutorial is to familiarize you with the language and specifc methods of querying, if you need an overview of databasing, I recommend you go | ||
Just by arriving at this page, you've begun your first step on the road to query mastery. The goal of this website is to take you through some basic tutorials, giving you a general feel of how Structured Query Language works. The scope of this tutorial is to familiarize you with the language and specifc methods of querying, if you need an overview of databasing, I recommend you go | ||
<%= link_to("here.", 'http://code.google.com/edu/tools101/mysql.html')%> | ||
<br /> | ||
<br /> | ||
The tutorial will allow you to interact with a database by writing SQL statements to it. Click the "querydb" button to submit your statement to the database. The results (or an error message) will display back to your screen. Once you are ready for the next lesson, simply hit the "Next Section" link. | ||
The tutorial will allow you to interact with a database by writing SQL statements to it. Click the "QueryDB" button to submit your statement to the database. The results (or an error message) will display back to your screen. Once you are ready for the next lesson, simply hit the "Next Lesson" button. | ||
<br /> | ||
<br /> | ||
To start, let's write a simple select query against the database. Try <code>"select * from courses"</code> below. | ||
To start, let's write a simple select query against the database. Try <code>"select * from courses"</code> below. | ||
</p> | ||
|
||
<!--Text area for next query--> | ||
<%= form_tag(sqlcons_fetchquery_path, :method => "get") do %> | ||
<%= text_area_tag(:q, "", :size=>"90x3") %> | ||
<br /> | ||
<%= submit_tag("querydb", :onclick=>"this") %> | ||
<%= submit_tag("QueryDB", :onclick=>"this") %> | ||
<% end %> | ||
</body> | ||
</div> | ||
<div class="span6"> | ||
<%= render :file => @help_name%> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<h3>Ch4-4 : Max/Min</h3> | ||
<p> | ||
<br /> <br /> | ||
<br /><code>code > 1</code> | ||
The final section of our tutorial involves the max/min functions. The syntax is identitcal, but as you might guess the result for each varies. Use this functions on a particular column to fetch the maximum/minimum value of that field. | ||
<br /><code>select max(id) from course_fcts</code> | ||
<br / > | ||
|
||
Note: To increase complexity, add a where clause limit which rows you search for max/min in. | ||
</p> |