Said Salomon Unitrin Direct Insurance T-SQL for Beginners Said Salomon CODE CAMP
I have over 25 year experience IT. I have a vast array of abilities in the field in the areas of Network, Desktop Support, DBA, Staff Project Management, Application Software Development, Business Analysis and Quality Assurance. I have Microsoft certifications as MCTS, MCPS, and MCNPS, and multiple certifications from the Insurance Institute of America.
What does the T stand for? Transact Structured Query Language SQL is a database computer language designed for managing data in database management systems
A way to organize large amounts of data A collation of spreadsheets A database is a collations a Tables A server is a collation of databases
A Table is a collations of fields (columns). Tables have rows and each rows has columns Tables are connected together logically with keys and or indexes.
Basics of Microsoft SQL Management Studio How to connect to a server How to explore a database on the server Basic of how to use the interface to run SQL scripts Create, Drop Insert, Update Select, Join
INNER Join – Result will contain matching records from both tables LEFT Join – Result will contain all records from the “left” table even if the join-condition does not find any matching record in the “right” table RIGHT Join – Result will contain all records from the “right” table even if the join-condition does not find any matching record in the “left” table FULL Join – Result will contain all records from both tables, and fill in NULLs for missing matches on either side CROSS Join – Result will contain returns the cartesian product of the sets of records from the two joined tables (Dangerous with large tables)
SELECT [ ALL | DISTINCT ] [ TOP ( expression ) [ PERCENT ] [ WITH TIES ] ] ::= { * | { table_name | view_name | table_alias }.* | { [ { table_name | view_name | table_alias }. ] { column_name | $IDENTITY | $ROWGUID } | udt_column_name [ {. | :: } { { property_name | field_name } | method_name ( argument [,...n] ) } ] | expression [ [ AS ] column_alias ] } | column_alias = expression } [,...n ]
[ WITH [,...n ] ] INSERT [ TOP ( expression ) [ PERCENT ] ] [ INTO ] { | rowset_function_limited [ WITH ( [...n ] ) ] } { [ ( column_list ) ] [ ] { VALUES ( { DEFAULT | NULL | expression } [,...n ] ) [,...n ] | derived_table | execute_statement | | DEFAULT VALUES } } [; ] ::= { [ server_name. database_name. schema_name. | database_name.[ schema_name ]. | schema_name. ] table_or_view_name } ::= SELECT FROM ( ) [AS] table_alias [ ( column_alias [,...n ] ) ] [ WHERE ] [ OPTION ( [,...n ] ) ]
[ WITH [...n] ] UPDATE [ TOP ( expression ) [ PERCENT ] ] { | rowset_function_limited [ WITH ( [...n ] ) ] } SET { column_name = { expression | DEFAULT | NULL } | { udt_column_name.{ { property_name = expression | field_name = expression } | method_name ( argument [,...n ] ) } } | column_name {.WRITE ) } = expression = column = expression | column_name { += | -= | *= | /= | %= | &= | ^= | |= } expression { += | -= | *= | /= | %= | &= | ^= | |= } expression = column { += | -= | *= | /= | %= | &= | ^= | |= } expression } [,...n ] [ ] [ FROM{ } [,...n ] ] [ WHERE { | { [ CURRENT OF { { [ GLOBAL ] cursor_name } | cursor_variable_name } ] } } ] [ OPTION ( [,...n ] ) ] [ ; ] ::= { [ server_name. database_name. schema_name. | database_name.[ schema_name ]. | schema_name. ] table_or_view_name}
Sample databases Intro course SQL Server 2008, Dev Edition My Twitter SaidSalomon