Can id start from a number?

In most programming languages and database systems, identifiers (like variable names, table names, etc.) cannot start with a number. They typically must begin with a letter (a-z, A-Z) or an underscore (_).

For example, in Python:

1variable = 5  # This will raise a syntax error
_variable = 5  # This is valid
variable1 = 5  # This is valid

In SQL, table names and column names also follow similar rules. Always check the specific language or system documentation for exact rules regarding identifiers.

0 Comments

no data
Be the first to share your comment!