Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

learning to make sense of the syntax of syntax

Tags:

syntax

sql

mysql

i want to use alter table

but the syntax posted here:

http://dev.mysql.com/doc/refman/5.1/en/alter-table.html

is very confusing

i do not understand what the [ ] mean or the { } mean or the pipes

is there some kind of tutorial that can help me understand this?

like image 753
Alex Gordon Avatar asked May 26 '10 21:05

Alex Gordon


People also ask

What is the learn of syntax?

Syntax refers to the formation of sentences and the associated grammatical rules (Foorman, et al., 2016 ). "Syntax skills help us understand how sentences work—the meanings behind word order, structure, and punctuation.

How do students learn syntax?

Students build syntactic awareness through exposure to oral language when they are young and particularly through exposure to written language that they hear through read aloud or independent reading (around grade 3).

What have you learned about syntax?

Syntax, a linguist's word for sentence structures, is the rule system that governs how words and phrases are arranged into clauses and sentences. Grammar, though related, is not the same as syntax. It has to do with the function (i.e., role) of words and phrases in a sentence.


1 Answers

  • The brackets [ ] denote optional expressions
  • The pipes mean OR.
  • The braces { } group words for the pipes.

For example:

  • [COLUMN] means that the word COLUMN can optionally appear
  • {INDEX|KEY} means that either INDEX or KEY must appear
  • [FIRST | AFTER col_name ] means that the word FIRST or AFTER (the name of a column) can optionally appear
like image 82
SLaks Avatar answered Oct 31 '22 07:10

SLaks