Tutorial by Examples

SQL Server 2008 R2 SET TRANSACTION ISOLATION LEVEL SERIALIZEABLE This isolation level is the most restrictive. It requests range locks the range of key values that are read by each statement in the transaction. This also means that INSERT statements from other transactions will be blocked if the...
We can create it by two way. First from database properties designer mode: And by sql scripts: USE master; GO -- Create the database with the default data -- filegroup and a log file. Specify the -- growth increment and the max size for the -- primary data file. CREATE DATABASE TestDB ON...
CROSS APPLY enables you to "join" rows from a table with dynamically generated rows returned by some table-value function. Imagine that you have a Company table with a column that contains an array of products (ProductList column), and a function that parse these values and returns a set ...
CROSS APPLY enables you to "join" rows from a table with collection of JSON objects stored in a column. Imagine that you have a Company table with a column that contains an array of products (ProductList column) formatted as JSON array. OPENJSON table value function can parse these values...
If you store a list of tags in a row as coma separated values, STRING_SPLIT function enables you to transform list of tags into a table of values. CROSS APPLY enables you to "join" values parsed by STRING_SPLIT function with a parent row. Imagine that you have a Product table with a colu...
This section describes some basic DDL (="Data Definition Language") commands to create a database, a table within a database, a view and finally a stored procedure. Create Database The following SQL command creates a new database Northwind on the current server, using pathC:\Program Fi...
You must create your own database, and not use write to any of the existing databases. This is likely to be one of the very first things to do after getting connected the first time. CREATE DATABASE my_db; USE my_db; CREATE TABLE some_table; INSERT INTO some_table ...; You can reference your...
Bashdb is a utility that is similar to gdb, in that you can do things like set breakpoints at a line or at a function, print content of variables, you can restart script execution and more. You can normally install it via your package manager, for example on Fedora: sudo dnf install bashdb Or ...
The following databases exist for MySQL's use. You may read (SELECT) them, but you must not write (INSERT/UPDATE/DELETE) the tables in them. (There are a few exceptions.) mysql -- repository for GRANT info and some other things. information_schema -- The tables here are 'virtual' in the sense ...
Stop the MySQL (mysqld) server/daemon process. Start the MySQL server process the --skip-grant-tables option so that it will not prompt for a password: mysqld_safe --skip-grant-tables & Connect to the MySQL server as the root user: mysql -u root Change password: (5.7.6 and newer): ALT...
The -path parameter allows to specify a pattern to match the path of the result. The pattern can match also the name itself. To find only files containing log anywhere in their path (folder or name): find . -type f -path '*log*' To find only files within a folder called log (on any level): fin...
Detailed instructions on getting azure-active-directory set up or installed.
It is well known that you cannot use the same file for input and ouput in the same command. For instance, $ cat header.txt body.txt >body.txt doesn’t do what you want. By the time cat reads body.txt, it has already been truncated by the redirection and it is empty. The final result will be th...
In Julia, when looping through an iterable object I is done with the for syntax: for i = I # or "for i in I" # body end Behind the scenes, this is translated to: state = start(I) while !done(I, state) (i, state) = next(I, state) # body end Therefore, if you wan...
On Julia, you can define more than one method for each function. Suppose we define three methods of the same function: foo(x) = 1 foo(x::Number) = 2 foo(x::Int) = 3 When deciding what method to use (called dispatch), Julia chooses the more specific method that matches the types of the argument...
JSON is a popular data interchange format. The most popular JSON library for Julia is JSON.jl. To install this package, use the package manager: julia> Pkg.add("JSON") The next step is to test whether the package is working on your machine: julia> Pkg.test("JSON") I...
JSON that has been encoded as a string can easily be parsed into a standard Julia type: julia> using JSON julia> JSON.parse("""{ "this": ["is", "json"], "numbers": [85, 16, 12.0], "and": [t...
The JSON.json function serializes a Julia object into a Julia String containing JSON: julia> using JSON julia> JSON.json(Dict(:a => :b, :c => [1, 2, 3.0], :d => nothing)) "{\"c\":[1.0,2.0,3.0],\"a\":\"b\",\"d\":null}" julia>...
You can list all files ignored by git in current directory with command: git status --ignored So if we have repository structure like this: .git .gitignore ./example_1 ./dir/example_2 ./example_2 ...and .gitignore file containing: example_2 ...than result of the command will be: $ g...
The clauses in a SELECT have a specific order: SELECT ... FROM ... WHERE ... GROUP BY ... HAVING ... ORDER BY ... -- goes here LIMIT ... OFFSET ...; ( SELECT ... ) UNION ( SELECT ... ) ORDER BY ... -- for ordering the result of the UNION. SELECT ... GROUP_CONCAT(DISTINCT x ORDER B...

Page 762 of 1336