Quantcast

What are the rules for defining names for tables and columns?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

What are the rules for defining names for tables and columns?

email@n0code.net
Hi,

I’ve scoured the archives and the sqlite documentation but can’t find the definitive rules
for defining table and column names.

I did see we can’t use keywords and tables can not begin with sqlite_.  Are there others?
What characters can we use?  Is it the same as MySQL?

Thanks,
Eric
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What are the rules for defining names for tables and columns?

Clemens Ladisch
[hidden email] wrote:
> I’ve scoured the archives and the sqlite documentation but can’t find the definitive rules
> for defining table and column names.

Everything is allowed, except names beginning with "sqlite_".

> I did see we can’t use keywords

The documentation disagrees: http://www.sqlite.org/lang_keywords.html

CREATE TABLE "TABLE"("#!@""'☺\", "");  -- keyword, special characters, empty name


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What are the rules for defining names for tables and columns?

email@n0code.net
Wow!  Ok - awesome!  Thanks!


> On Mar 27, 2017, at 10:45 AM, Clemens Ladisch <[hidden email]> wrote:
>
> [hidden email] wrote:
>> I’ve scoured the archives and the sqlite documentation but can’t find the definitive rules
>> for defining table and column names.
>
> Everything is allowed, except names beginning with "sqlite_".
>
>> I did see we can’t use keywords
>
> The documentation disagrees: http://www.sqlite.org/lang_keywords.html
>
> CREATE TABLE "TABLE"("#!@""'☺\", "");  -- keyword, special characters, empty name
>
>
> Regards,
> Clemens
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What are the rules for defining names for tables and columns?

Hick Gunter
In reply to this post by Clemens Ladisch
>-----Ursprüngliche Nachricht-----
>[hidden email] wrote:
>> I’ve scoured the archives and the sqlite documentation but can’t find
>> the definitive rules for defining table and column names.
>
>Everything is allowed, except names beginning with "sqlite_".
>

This calls for a (not quite) OT Quote: 1. Corinthians Chapter 6 Verse 12:
KJV "All things are lawful unto me, but all things are not expedient"
NIV "I have the right to do anything,” you say—but not everything is beneficial."


___________________________________________
 Gunter Hick
Software Engineer
Scientific Games International GmbH
FN 157284 a, HG Wien
Klitschgasse 2-4, A-1130 Vienna, Austria
Tel: +43 1 80100 0
E-Mail: [hidden email]

This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.


_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: What are the rules for defining names for tables and columns?

email@n0code.net
:)  Roger that.

> On Mar 27, 2017, at 10:58 AM, Hick Gunter <[hidden email]> wrote:
>
>> -----Ursprüngliche Nachricht-----
>> [hidden email] wrote:
>>> I’ve scoured the archives and the sqlite documentation but can’t find
>>> the definitive rules for defining table and column names.
>>
>> Everything is allowed, except names beginning with "sqlite_".
>>
>
> This calls for a (not quite) OT Quote: 1. Corinthians Chapter 6 Verse 12:
> KJV "All things are lawful unto me, but all things are not expedient"
> NIV "I have the right to do anything,” you say—but not everything is beneficial."
>
>
> ___________________________________________
> Gunter Hick
> Software Engineer
> Scientific Games International GmbH
> FN 157284 a, HG Wien
> Klitschgasse 2-4, A-1130 Vienna, Austria
> Tel: +43 1 80100 0
> E-Mail: [hidden email]
>
> This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation.
>
>
> _______________________________________________
> sqlite-users mailing list
> [hidden email]
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

_______________________________________________
sqlite-users mailing list
[hidden email]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Loading...