There is no native installation for macOS, but there are instructions how to install the Linux port using a Docker container.
More information:
Just another CUNY Academic Commons site
There is no native installation for macOS, but there are instructions how to install the Linux port using a Docker container.
More information:
We have started retrieving data from one or more tables and using built-in functions. It is time for fun!
Download the class notes for day 2.
We have started a new class. We covered what SQL can do like getting the correct cookies when going to The Corner Shop for a boss who does not give up complete details of what you need to buy.
Download the class notes for day 1.
Get yourself a list of websites and other resources to read and for reference. The following are some recommendations.
We have come to the end of another course and now you have a good understanding what SQL can do.
Download the class notes for day 10.
We are reaching the end of the course and this means programmability.
CREATE PROCEDURE quick_example @in_param VARCHAR(50) -- passing a value into the procedure using parameter -- `@in_param` declared as a VARCHAR(50) AS BEGIN -- beginning of code do something when executing this -- procedure DECLARE @out_param VARCHAR(50) -- receive value from it has been processed, using -- the same data type (VARCHAR(50)) SET @out_param = CONCAT ( '`', @in_param, '` processed as `', UPPER(@in_param), '`' ) -- passing a value. the original value processed PRINT @out_param -- printing the value of the output parameter -- end of code to do something when executing this procedure END;
Download the class notes for day 8.
We continue creating and altering database objects. Now all the material you have learned will be used when creating views.
Download the class notes for day 7.
We are half-way done with the course. We are now creating, dropping and altering objects.
CREATE obj_type obj_name [some_code] CREATE DATABASE db_name; CREATE SCHEMA schema_name; CREATE TABLE table_name; ( field_1 datatype_1 [atributes], field_2 datatype_2 [atributes], field_3 datatype_3 [atributes], ... ); CREATE VIEW view_table AS ( SELECT fields... FROM table(s) );
Download the class notes for day 6.
We have worked with data coming from one function fed into another. We need to keep in mind that the process starts from the inside out.
function_5(some_value5... function_4(some_value4... function_3(some_value3... function_2(some_value2... function_1(some_value1... ) -- output of function_1 into function_2 ) -- output of function_2 into function_3 ) -- output of function_3 into function_4 ) -- output of function_4 into function_5 ) -- output of function_5
We have seen functions that affect strings and numeric values including `FORMAT()` to change the look of dates and currencies. Doing the latter changes the value from a numeric value to a string by default in SQL Server to `NVARCHAR(n)`.
Download the class notes for day 5.
We have started putting logic in our code to avoid logical errors.
CASE WHEN condition1 THEN action1 WHEN condition2 THEN action2 ELSE escape_action END
Download the class notes for day 4.