Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Create Another Field After Create Table


i have create a table from CLI, i would like to add another field after create table.
How to do that ?




View Complete Forum Thread with Replies

Related Forum Messages:
How To Create Index When Doing 'create Table As Select'
Code:
Create mysqlorary table mysql
AS SELECT
Name
FROM
EmployeeList
WHERE
Dept = 'XXX'

I would l ike to create an index on the field Name of the mysqlorary table mysql. I wonder if I can create the index on the fly by adding sth in the above statement.

View Replies !
Create A Table Which Name Is A Field From Another Table
As subject tells I'm tryibg to create a table whose name is the content from a field of another table.
It should look like:

create table (select title from book) (id int (1), subject char(8)) engine=innodb;

View Replies !
Create A Field By Deleting A Part Of The String From Another Field!
I have a table for "Addresses", which has a column titled "Address" and the records in this column are a combination of house#, street name and street suffix, which typically looks like "100 Main Street".

I am looking for a query result wherein a new column would be created which would have only the street name and the suffix and would eliminate the house #s, hence the result would look like "Main Street".

View Replies !
If I Create An Index With Multiple Fields Do I Still Need To Create Individual Ones?
I have a table where the name field can only contain duplicates when the user_id field is different, so I create an index with user_id,name. Now I was wondering if I want to search just for the user_id or the name field individually does this dual field index count, or should I create another index for the user_id and the name?

View Replies !
Create Audit Field
I have very little knowledge of databases and MySql...trying to learn though. I have a table that I created...Zipcode

ZipCode_Id - Int
City - Varchar
State - Varchar
ZipCode - Varchar
Created_By - Varchar
Created - datetime
Modified_By - Varchar
Last_Modified - Timestamp

I'm trying to figure out how to get the created field to populate with the datetime that is was created. Timestamp works for Last_Modified and updates if I make a change so I assume that is correct. I tried using Timestamp for Created as well but I get an error that makes me think I can only have one Timestamp field.

I've been reading and reading and reading and I'm not sure how to accomplish this...I was reading about triggers but I don't know if that is the right path. I don't want the field to update, just populate when it is created.

View Replies !
Create Identity Field
i have

CREATE TABLE `batch` (
`id` INT NOT NULL ,
`date` DATETIME NULL ,
`dateclosed` DATETIME NULL
) TYPE = MYISAM ;

how do I change this that the id should be a autonumber identity field?

View Replies !
Create Index On Date Field
I have a table:

+-------------+--------------------------+------+-----+---------+-------
---------+
| Field | Type | Null | Key | Default | Extra
|
+-------------+--------------------------+------+-----+---------+-------
---------+
| id | int(11) | | PRI | NULL |
auto_increment |
| NUMFATT | int(5) unsigned zerofill | | | 00000 |
|
| dataemiss | date | YES | | NULL |
|
+-------------+--------------------------+------+-----+---------+-------
---------+
(the table has more fields but I removed them to semplify the view of
it). Where I want to create a UNIQUE index with two tables 'dataemiss' and 'NUMFATT'
'dataemiss' is a date format and in the index I want to consider just the year part of the date.
I cannot change the field type setting it as a string (ex. char, var, etc.). any hint on how to do it?
The goal of this is index is to avoid to insert the same 'NUMFATT' twice
or more in the same year. I'm using MySQL 4.0.13 on Win 2K server.

View Replies !
Unable To Create Auto_Increment Field
I want to have an auto_increment field in my DB but when i type in :

ALTER TABLE `test` ADD `id` SMALLINT( 11 ) DEFAULT '1' NOT NULL AUTO_INCREMENT FIRST

it wrotes:#1067 - Invalid default value for 'id'

but why can't i set the default on 1? I tried also other numbers, but it doesn't work.

View Replies !
Create An Index Using A Substring Of A Field Value
Can something like this be done to create an index in MySQL 5?

ALTER TABLE `contact_info` ADD INDEX `idx_emailDomain`( SUBSTRING_INDEX(`Email`, '@', -1) ) ;

I've tried it and get an syntax error where I am trying to use SUBSTRING_INDEX() function.



View Replies !
Create Image File From Blob Field
I has images saved on an mysql table as an blob field, but i could not recreate the image as file by selecting an specific record of this field.

View Replies !
How Much Overhead Will Insert Ignore Create On A Varchar Field?
as per the "summary", how much overhead will be created when using INSERT IGNORE in a loop of potentially thousand of records, where 2 columns have UNIQUE keys set?

I would imagine if we are talking INT fields it would be pretty quick, but one option is that I have unique on an INT field, and unique on a VARCHAR field of approx. 30 characters in length.... then I thought it might suck resource wise checking if the VARCHAR field is unique in terms of the overall table size, which will vary in size depending on the time of day.

View Replies !
Create MySQL Select Query From The A Field Using SUBTRING_INDEX
Is it possible to create a MySQL query to do the following.

Extract from TABLE.field, which is defined as text, containing either NULL, number (e.g. 54) or range of numbers (e.g. 70-95).

Then use the extracted number within a WHERE clause


I have looked into using something like SELECT SUBSTRING_INDEX(table.field, '-', 1);

Problem is I don't know how to use this within the WHERE clause.

View Replies !
Create Trigger To Add UUID() Value To A Field When Record Insert
I added a field to my users table, the field name is uuid, and I want to create a trigger that activates on insert and set the uuid value for that new inserted record to the function UUID(). I tried this, but no success

MySQL
CREATE TRIGGER uuid_users_insert BEFORE INSERT ON `users`FOR EACH ROWBEGINSET NEW.uuid = UUID();END;

I get this error:

Quote:

ERROR 1064 (42000): 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 '' at line 4


View Replies !
How To Create Different Namespaces When Using CREATE VIEW?
I'm doing a triple join between tables which have similarly named fields...I was hoping that when using CREATE VIEW, the result would be a table with fields such as a.field, b.field, c.field...but I get an error "Duplicate column name 'field'"

...How can I get around this besides changing the name of the duplicate field in each table?

View Replies !
Create Table Sql
I get error "#1005 - Can't create table './sitemanager2/test_buyers.frm' (errno: 150)

when I add the foreigh key statment, can someone tell me what is wrong with it? If I don't have that , table gets created. I ndo have a table 'test_parent_offer' with a field 'id'

CREATE TABLE `test_buyers` ( `id` bigint(20) NOT NULL auto_increment, `buyer` varchar(255) NOT NULL default '', `api_name` varchar(255) NOT NULL default '', `active` varchar(255) NOT NULL default '', `path` varchar(255) NOT NULL default '', `type` enum('url','view') NOT NULL default 'url', `offer_id` int(11) default NULL,
`parent_id` int(11) default NULL,
CONSTRAINT FOREIGN KEY (`id`) REFERENCES `test_parent_offer` (`id`) ON DELETE CASCADE,
PRIMARY KEY (`id`)) ENGINE=InnoDB DEFAULT CHARSET=latin1

View Replies !
Create New Table
I have a master table called 'master'. On a monthly basis, I create a new table called 'tbl_200410' (for october this year) - Once the table is created, I want to take some field out of the 'master' table and insert the data into the newly created table.
How would I do that ? The fields are named the same in both tables.

View Replies !
Cannot Create Table
I've just installed the latest stable 5.0.37 community server on my MacBook running OSX 10.4.9 with all patches up to date.
I am using MySQL Client 5.1.8 and Query Browser 1.2.11, and the standard Apache built into the OS. I am running as root on localhost as this is purely a development environment and I will tighten up security later on.
I am a standard user under OSX and installed the MySQL server and tools from this account, using an Athenticate admin login/password when prompted.
The problem comes when trying to create a table using the GUI. The following code was created using the GUI's New Table form in the `Training` schema:

CREATE TABLE `Training`.`INS_Instances` (
`INS_ID` INT NOT NULL AUTO_INCREMENT,
`INS_Description` VARCHAR,
PRIMARY KEY (`INS_ID`)
)
ENGINE = InnoDB
CHARACTER SET utf8;

Results in an SQL Syntax error. Breaking it down into a script Window, the script fails on "CREATE TABLE" (which I placed on its own on the first line) I can't see anything obviously wrong with the statement.

View Replies !
Can't Create A Table
I'm trying to install geeklog, and since I use MySQL only occasionally I'm not exactly sure what I'm doing. I've got no problem creating the database, but I'm doing something wrong with permissions, apparently. I'm using 5.0.22 on RHEL5.

mysql> show grants for current_user;
+-------------------------------------------------------------------------------
-----------------------------------------------------------+
| Grants for denman_user@localhost
|
+-------------------------------------------------------------------------------
|
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER O
N `geeklog`.`geeklog` TO 'denman_user'@'localhost' |
+-------------------------------------------------------------------------------
-----------------------------------------------------------+

mysql> use geeklog
Database changed

mysql> create table testing;
ERROR 1142 (42000): CREATE command denied to user 'denman_user'@'localhost' for
table 'testing'

View Replies !
Create Table
I have a script that creates a new table which works fine in MySQL version 5.027-standard-log
The script creates a new table named eventImpression
I recently installed MySQL version 5.1.22-rc-community
and now running my script will only produce a table with the name eventimpression
Notice how the table name no longer has the capital 'I' although the script clearly has the uppercase 'I'
Does anybody know what may be the cause of this problem?

View Replies !
Can't Create Table
SELECT r501.pat, r501.ped, r701.pedorig,r501.cveped, r506.fecha, CASE WHEN r501.rfcimp = ' '
THEN r501.crupimp
ELSE r501.rfcimp END,
r501.curpaa, r501.pesob, importe.suma, bancos_3.nombrebanco, r501.archivo from r501
inner join firmas2 on r501.ped = firmas2.pedto and r501.pat = firmas2.pat and .........

View Replies !
Create Virtual Table During Query Or Load Table To Memory From Text File
I have access to my application database via a secure link, so I cannot link a local database to it, only run queries on the remote server and download the result.

The database is missing some useful information, and I cannot add a table at this stage. I would like to achieve the result by creating a virtual table or the like. ...

View Replies !
ERROR 1005: Can't Create Table './db/table.frm' (errno: 150)
I found the key to solve this problem in:

http://darkstar.ist.utl.pt/mysql/do...onstraints.html

You'll probably need an INDEX for that new foreign key you are declaring in
older versions this isn't neccesary but in latest ones it is a restriction.

You can have more info about the error description if you have root access
by typing
mysql> show innodb status;

LATEST FOREIGN KEY ERROR
------------------------
030807 1:27:10 Error in foreign key constraint of table database/table:
There is no index in the table database/table where the columns appear
as the first columns. Constraint:
foreign key (key) references database.table(key) on delete cascade)
type=innodb

also if you type:
shell> perror 150

you obtain:
150 = Foreign key constraint is incorrectly formed

I hope this to be enough...

View Replies !
ALTER TABLE Produces Error # 1005 Can't Create Table.
I'm a SQL 2000 DBA intern

I'm replicating a current production MySQL DB into a WAMP enviornment on my computer. The production version is on a MySQL 5.0.22-Debian_0ubuntu6.06.3 and my WAMP sandbox is running MySQL 5.0.51b.

So i exported the production database to a sql file and tried using phpMyAdmin to upload it to my WAMP sandbox. MySQL on my computer gave me and error on the piece of code:

ALTER TABLE `Event_Crews` ADD CONSTRAINT `Event_Crews_ibfk_1` FOREIGN KEY ( `Event_ID` ) REFERENCES `Events` ( `Event_ID` ) ON DELETE CASCADE ON UPDATE CASCADE

where Event_ID on both tables is an int.

and I get this error from MySQL:

#1005 - Can't create table '.ambulance#sql-11d8_7d.frm' (errno: 150)

View Replies !
Could Not Connect To The Database, Please Recheck The Settings You Specified. Also Make Sure That A Database With The Name You Specified Already Exists On The Database Server. PhpAdsNew Will Not Create The Database For You, You Must Create It Manually
The error message I get above is the same everytime when trying to install phpAdsnew. I have tried everything. I am hosted through yahoo! and have actually succesfully installed scripts before even though I know nothing about it. Now that I have a "auto-install", it does not work. Yahoo! also offers php-nuke with the auto-install where you just click a few buttons, and I get a similar error stating that it can not conect to the database.

Please can anyone help me and tell me what I am doing wrong?

View Replies !
Error In CREATE TABLE
I am having error trying to run some mysql script (back from 2001). It
gives me the error like :

ERROR 1067 (42000) at line 48: Invalid default value for 'log_id'

in the statement :

CREATE TABLE Log (
log_id int(11) DEFAULT '0' NOT NULL auto_increment,
source_id smallint(6) DEFAULT '0' NOT NULL,
l_time datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
l_nanos int(11) DEFAULT '0' NOT NULL,
l_message text,
PRIMARY KEY (log_id)
);

What is this? I am not familiar with mysql, the script is part of
another installation script for the program made in 2001 by the
company that no longer exists. We needed to upgrade the machine the
program was running (redhat 8) to the RedHat ES 4. Now the installation
script gives us this error.

View Replies !
Create Temporary Table
When I try and run the following query

create temporary table russ1 as

select rcust.*

from rcust;

and I receive the error message:

Error Code : 1044

Access denied for user: 'russ@192.168.1.79' to database 'customer'

(0 ms taken)

I can run the query from the command line of the server and the query
works correctly.

I have run the query GRANT ALL PRIVILEGES ON customer.* TO
russ@192.168.1.79

In addition, I flushed the privileges, and I stopped and restarted the
database.

View Replies !
InnoDB, Can't Create Table
I had error message "Can't create table *.frm (errno:121)" when I was trying to create an innoDB table in MySQL Server 4.0.15. I know that the reason is the .frm files was deleted by some one which left data files. Does anybody know how to report and repair this sort of error.

View Replies !
Create Table Error 150
I am getting the error message

Script line: 84 Can't create table '.dwhf_umsatz.frm' (errno: 150)

during execution of the following script on a windows system and mysql 5.0: ...

View Replies !
#1005 - Can't Create Table
create table question_info (
question_no int,
author_id int,
subject char(30) not null,
topic char(30) not null,
question mediumblob not null,
question_type char(1) not null,
option1 mediumblob,
option2 mediumblob,
option3 mediumblob,
option4 mediumblob,
answer mediumblob,
level_of_difficulty char(1) not null,
marks int not null,
time_rqrd time not null,
primary key(question_no),
foreign key(author_id) references user(userid)
)

I have executed this query in linux but its giving
"#1005 - Can't create table '.question_bankquestion_info.frm' (errno: 150)"

error.....

View Replies !
CREATE TABLE AS SELECT
I'm trying to write a bit of code that I can use to create development copies of databases and specific tables.I've made a number of script that can do what I'm after apart from one small problem.. the development server uses it's own installation of mysql.I've able to re-create databases and tables on the same server easy enough using..

CREATE TABLE AS SELECT*

and

SELECT * INTO OUTFILE

but for the life of me I can't think of away to transfer the tables structure from server to server.

View Replies !
Create Table Select
I've been doing some googling and searching the forums but I'm not finding any clear explainations of what I want.
I need to keep a daily backup (1 for each day of the week) of a table and I'm not sure of the best way to do it and keep the information as easily accessable for use as possible. There would be 6 tables that I would want to routinely "truncate" and then fill with the data from the current day. That would give me 7 days worth all the time but only the current days table being written to.
That said, maybe it's even best to dump the table to an XML file and keep it that way instead of using a backup table for each day. I'm just not sure what's going to be the most efficent for both the server/db overhead and ease of grabbing and parsing the data for use.I'm hoping a few of you guys have needed to do stuff like this and can give me some suggestions for the best way to accomplish this.

View Replies !
Errors In CREATE TABLE
For some reason i can never get it right!!! I am making a blog and now entering the blog in the database Code:

CREATE TABLE blog( title CHAR(20) NOT NULL , date DATE, message NOT NULL);


View Replies !
Create Table Query
I just dump this script from another database so I could add the same create table query for different db, when I run the query I get the error.

mysql> CREATE TABLE SENT_MESSAGES (
-> INDNUMBER int(11) NOT NULL auto_increment,
-> CLIENT varchar(100) NOT NULL default '',
-> CODE varchar(100) NOT NULL default '',
-> TYPE varchar(100) NOT NULL default '',
-> WHEN timestamp(14) NOT NULL,
-> PRIMARY KEY (INDNUMBER)
-> ) TYPE=MyISAM;
ERROR 1064: You have an error in your SQL syntax near 'WHEN timestamp(14) NOT NULL,
PRIMARY KEY (INDNUMBER)
) TYPE=MyISAM' at line 6

View Replies !
Table Create Error
I just dump those table from mysql table, and re-run this sql code on different db name and it gives me the following error:

mysql> CREATE TABLE SENT_MESSAGES (
-> INDNUMBER int(11) NOT NULL auto_increment,
-> CLIENT varchar(100) NOT NULL default '',
-> CODE varchar(100) NOT NULL default '',
-> TYPE varchar(100) NOT NULL default '',
-> WHEN timestamp(14) NOT NULL,
-> PRIMARY KEY (INDNUMBER)
-> ) TYPE=MyISAM;
ERROR 1064: You have an error in your SQL syntax near 'WHEN timestamp(14) NOT NULL,
PRIMARY KEY (INDNUMBER)
) TYPE=MyISAM' at line 6

View Replies !
Create A Workschedule Table
Tips needed on how to create a workschedule table. Students will be entering their available work hours and class schedule in the same table. I would like to have Sunday through Sarurday as the columns and the hours from 6:00 a.m. to 11:00 p.m. as the rows. The hours will be in one hour increments (ex. 6:00 - 7:00, 7:00 - 8:00 and so on ).

View Replies !
Create A Table Without A Primary Key
I have a developer who was trying to create a table without a primary key, and he was having problems inserting data in via some c++ routines. When he added a primary key everything worked fine.
Any ideas why this might happen?
Why would you ever create a table without a primary key?

View Replies !
Can Not Create A Table (mysql 5.0.22)
I am using mysql 5.0.22 and I can not create a table. I end up getting a 1064 error. I can insert, delete, and update within the tables just fine.

I looked at the user permissions and I have assigned all priviledges to the user. I am using MySQL Administrator and MySQL Query Browser and I get the same problem in both. I even tried doing it manually within the Query Browser but its the same error.

I have just recently upgraded mysql from 4 to 5 and was wondering if there was a setting I needed to change so I can create tables.

View Replies !
Cannot Create Temporary Table
I cannot create a temporary table. What am I doing wrong?

CREATE TEMPORARY TABLE UMB.SRC_TMP
Select * from SRC_TMP limit 10;

Select count(*) from UMB.SRC_TMP;

table 'umb.src_tmp' doesn't exist.

View Replies !
Create Any Table With Name Schema
I created a database, then I try to create a table with name schema, but mysql don't allow me to do that, it says:
"Database ERROR: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 'schema ( vseq int(10) unsigned NOT NULL default '0', ' at line 1"
why?if I change schema to schema2 or any other name the table will be created and no problem oocure.what is wrong in this command?

View Replies !
Create Table Errno:121
why this won't execute?
CREATE TABLE `db_belafdeling`.`tbl_cat_testcategorie`
(
`ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`naam` VARCHAR(45) NOT NULL,
`resp_id` INTEGER UNSIGNED,
PRIMARY KEY(`ID`),
CONSTRAINT `FK_resp_id`
FOREIGN KEY `FK_resp_id` (`resp_id`)
REFERENCES `tbl_respondenten` (`ID`)
ON UPDATE RESTRICT ON
DELETE RESTRICT
)ENGINE = InnoDB;
and this will...?
CREATE TABLE `db_belafdeling`.`test_tabel` (
`ID` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
`naam` VARCHAR(45) NOT NULL,
`property_id` INTEGER UNSIGNED,
`anotherproperty_id` INTEGER UNSIGNED,
PRIMARY KEY(`ID`),
CONSTRAINT `FK_test_tabel_1` FOREIGN KEY `FK_test_tabel_1` (`anotherproperty_id`)
REFERENCES `tbl_beroeptype` (`ID`)
ON DELETE RESTRICT
ON UPDATE RESTRICT
)
ENGINE = InnoDB;

View Replies !
Cant Create Table On Mysql5
For an extension in my typo3 system i need to create a table. The extension could not create this table, so i try it manually in phpMyadmin. Code:

View Replies !
Join And Create Table
Is there a way to make a new table from the results of a query? I am new to MYSQL and hope this is possible. I know I can do this in foxpro. Here is what I think my code should look like:

SELECT e.job_id, e.grid_id, e.home_based, c.sector
FROM jobs_exported e, jobs_constants
WHERE e.job_id = c.job_id;

Then I would like to put the query results into a new table. Is this possible?

View Replies !
Create Table From Select
I have a query that need to put all data on this new table, the thing is that every day these table must be empty or delete and create the new table again

SELECT T.time, T.name, T.last, P.company, P.wife FROM T INNER JOIN P ON T.wife = P.wife and T.company = P.company INTO newtable

View Replies !
Create Table If Not Exists
I'm having trouble with this. My impression was that nothing would be done using this form, but it appears that the select clause is adding rows in to th existing table, but my intent was to only create a table once in my code:

CREATE TABLE IF NOT EXISTS z_set_1000_1999
(
SELECT rid, mid, rg
FROM ts2
WHERE rid>=1000 and rid<= 1999
ORDER BY rid, mid
);

and then refer to the table on later references to it, using:

SELECT rid, mid, rg FROM z_set_1000_1999 ORDER BY rid, mid;"

What appears to be happening is that the CREATE is adding duplicate rows to the existing table. The second time through, the table size doubled. Is that supposed to happen; insert the rows if the table exists? If so, how do I test if the table exists so I can go directly to the SELECT and bypass any additional creates or inserts?

Since I am creating a large number of tables like this, I thought it would be beneficial to query an existing tables rather than search a larger table every time, since so many of the queries are identical.

View Replies !
Unable To Create Table
I'm trying to create a table in a database in mysql but I keep getting an error...I posted it below can someone tell me why I'm getting this error:

mysql> use bob
Database changed
mysql> create tables checks
-> (check varchar(6) not null,
-> payee varchar(20) not null,
-> amount varchar(6,2) not null,
-> remarks varchar(20) not null);
ERROR 1064 (42000): 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 'table
s checks
(check varchar(6) not null,
payee varchar(20) not null,
amount var' at line 1

View Replies !
Create Table With Form
I have an html form that I want to create a new table when submitted. Is there a way to use input fields in the form ($username, $email) and create a table with it:

"CREATE TABLE ('username', 'email')(

various values

)";


View Replies !
Cannot Create Table Error (150)
I just reformatted my computer and upgraded to the newest mySQL. I'm using the .net mysql connector (inside of a c# .net application) and i have a script that creates a database.

if i call it from my app, i get this "Can't create table 'dbName.tableName' (errno: 150)" error. however, if i run that same exact script from SQLyog enterprise manager thing, it works fine. there is no inner exception, so i can't see exactly why it's failing.

if i ran into this with MS SQL, i would open up profiler and it would tell me what was going on here. is there a similar tool for mySQL? i tried the command line thing and did "status engine innodb" or whatever, and it just went on and on with dashes.


View Replies !
How To Specify AUTO_INCREMENT Value In CREATE TABLE ?
I've followed the manual but I keep getting errors.

Also can you start AUTO_INCREMENT with zero ?

I used Alter Table tablename AUTO_INCREMENT = 0;

got no errors, but it starts with 1; .....

View Replies !
Create New Table From Join
I have the following statement which joins together information from two separate tables:

SELECT *
FROM products
RIGHT JOIN products_store ON products.sku = products_store.product_id
LIMIT 0 , 600

Is there a way that I may then create a new table from the data that results from this statement?

View Replies !
Can't Create Table Errno:150
foreign key(av_id_lk) references anti_virus);

mysql> create table anti_virus(av_id integer,
-> manufacturer varchar(30),
-> version varchar(100),
-> date_of_publication integer,
-> primary key(av_id));
Query OK, 0 rows affected (0.06 sec)

mysql> create table av_license_keys(av_id_lk integer,
-> license_keys varchar(100),
-> foreign key(av_id_lk) references anti_virus);
ERROR 1005 (HY000): Can't create table '.my_testav_license_keys.frm' (errno: 1
50)
mysql>

View Replies !
Create Table Error Using C API
I'm having trouble creating tables using the C API. The same query works fine from the mysql command line interface. Here is the C code.

char* szCreateTableSQL = "CREATE TABLE DATALOG (Timestamp TIMESTAMP, TransportType INT, Address VARCHAR(64), DBName VARCHAR(64), UserName VARCHAR(64), Password VARCHAR(64), DataLog1 VARCHAR(255), DataLog2 VARCHAR(255), DataLog3 VARCHAR(255), DataLog4 VARCHAR(255), DataLog5 VARCHAR(255))";

if ( mysql_query( myData, szCreateTableSQL ) )
{
}

I'm using version 4.1 of MySQL. Can anyone tell me what I am doing wrong?

View Replies !
How To Create A Table Space?
how to create a tablespace in mysql?

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved