hi,
please correct my terminology if it is incorrect but i am trying to
create a number of tables by writing an sql script/batch file and using
the command:
mysql -D myDB -u myname --password=myPass <
scriptname.sql > err.sql 2>&1
and i am getting errors. the book i am using doesnt seem to cover this
topic well but i think i must be doing something silly that is
preventing the script from running successfully.
i have tried using and not using the single quotes in the following
examples. here is the error i get:
+++++++++++++++ ++++
ERROR 1064 at line 15: You have an error in your SQL syntax. Check the
manual that corresponds to your MySQL server version for the right
syntax to use near ''User'
(
'userId' varchar(25) not null primary key,
'la
+++++++++++++++ ++++
here are two entries in the script, one w/ quotes one w/o:
CREATE TABLE 'User'
(
'userId' varchar(25) not null primary key,
'lastName' varchar(25) not null,
'firstName' varchar(25) not null,
'organization' varchar(50) not null,
'phone' char(12),
'email' varchar(25),
'lastLogin' datetime,
);
CREATE TABLE Cookie
(
sessionId char(20),
userId varchar(25) not null references User(UserId),
);
+++++++++++++++ ++++++++
any thoughts will be appreciated.
tia,
peter 2 1615
picaza wrote: CREATE TABLE 'User'
MySQL uses backticks (`) to delimit identifiers. Otherwise using
identifiers that clash with SQL reserved words confuses the parser.
Regards,
Bill K. MySQL uses backticks (`) to delimit identifiers. Otherwise using identifiers that clash with SQL reserved words confuses the parser.
thanks bill,
i will go try it out now.
seeya,
peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Lauren Quantrell |
last post by:
Is there a way to create a text file (such as a Windows Notepad file)
by using a trigger on a table? What I want to do is to send a row of
information to a table where the table: tblFileData has only one
column: txtOutput
I want to use the DB front end (MS Access) to send the text string to
the SQL backend, then have the SQL Server create a file to a path,
such as F:/myfiledate.txt that holds the text in txtOutput, then the
trigger...
|
by: anon |
last post by:
I have been used to using DAO in the past, and then converted to ADO.
Now I am having to use VB.Net(2000) and ADO.NET and am experiencing
difficulties with the creation and population of an mdb.
I can create the MDB and am doing so by creating a module as shown below.
I have added the ADO reference: Microsoft ADO Ext. 2.7 for DDL and
Security in the references section of the project.
This creates the MDB but as soon as it tries to...
|
by: Brett B |
last post by:
Folk,
I have mysql installed via rpm package, but when I check the data
dirs, the only table there is "test". The instructions say there
should be others, like users tables, and other such tables.
I stopped the server and ran mysql_install_db which is the command to
create these, I get the following excerpt:
linux:/usr/bin # mysql_install_db --user=mysql
|
by: Zack Sessions |
last post by:
Has anyone tried to create a SQL7 view using the CREATE VIEW command
and ADO.NET? If so, is there a trick in trapping a SQL error when
trying to create the view? I have a VB.NET app that, amoung other
things, can create views based on existing tables and a table of
column name equivalents. If I accidently introduce a column name
equivalent that is the same as another column, I end up with a CREATE
VIEW SQL statement that is in error, if...
|
by: Madhu |
last post by:
All,
New to DB2 environment. Can someone share a script that can be used to
a create a DB2 UDB database manually. I am trying to create a database
on Linux, single partition.
Thanks
Madhu
| |
by: sandy |
last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory',
within my class Directory (Can you already smell disaster?)
Each Directory can have subdirectories so I thought to put these in an
array. The application compiles but aborts without giving me any useful
information.
What I suspect is happening is infinite recursion. Each Directory
object creates an array of Subdirectories each of which has an array of...
|
by: Rahul B |
last post by:
Hi,
I have a user UCLDEV1 which is a part of staff and a
group(db2schemagrp1) to which i have not given any permissions.
The authorizations of that user are shown as
db2 =get authorizations
Administrative Authorizations for Current User
|
by: creative1 |
last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however, working with complex reports is tricky
Assumption: Reader of this article have basic knowledge of creating data reports.
Creating a Parent-Child Command and create a DataReport
Suppose we have a database called company with two tables
...
|
by: lxyone |
last post by:
Using a flat file containing table names, fields, values whats the
best way of creating html pages?
I want control over the html pages ie
1. layout
2. what data to show
3. what controls to show - text boxes, input boxes, buttons,
hyperlinks ie the usual.
The data is not obtained directly from a database.
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |