Domain Search | www.


Related Pages:

Hi Im a bit stuck- I want to give a bunch of restrictions to an id in one table there are multiple restrictions
Hi Im a bit stuck- I want to give a bunch of restrictions to an id in one table there are multiple restrictions







select the schema, then select the data

gary, phpmyadmin

Hello peeps. Is there any way to make two conditions on a JOIN statement? Can you do: table ON x=x AND y=y?

mysql.com/join, and you will see

yep

Sweet! Thanks weigon!

drop table tableName1; drop table tableName2; drop table tableName3;

yes

You have an error in your SQL syntax; check the manual that corresponds to your mysql hosting server version for the right syntax to use near '; DROP TABLE entetes; DROP TABLE personnes; DROP TABLE tableentetes' at line 1

whats the query literally?

DROP TABLE entetes; DROP TABLE personnes; DROP TABLE tableentetes;

maybe older version didnt take that in one line, so make it separately

using mysql 5

iwfm

SHOW PROCESSLIST; ?

iwfm?

or is there any "dictionary view" which I can use ..? (excuse oracle lingo)

status info tells you number of threads
but if you want output, when mysqladmin -p proces | wc -l

that also counts the comment lines
1 thread = 1 mysql session/connection?

sure

this kind of sucks not being able to select it directly

mysql -p[yourpass] -Bse "show status like 'Threads_Connected'"
*sigh*

hey, how can i select a records by first letter? i've tried "user_nicename like 'A%'" but its not working well... any idea?

under windows how do i make it so i can type mysql in the shell without haveing to go to the php mysql web hosting bin dir and run mysql

add the bin directory to your PATH

i did that but it didnt work

you didn't do it right then

i forgot i have to restart lol

krupa^ What is the result when u use that sql host ?

krupa^: "not working well" means nothing you know. You better explain what the problem is

krupa^ yep I wanna know more information

Hi, My mysql is on drugs. It keeps wanting to create the relay-bin file in /var/run/mysqld/mysqld-relay-bin.000002. Why?

because it's running as a slave?

shabbs, Yes but why is it creating the file there? I get a monster error as well.

!man relay-log

see http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html

check out that setting

Could not parse relay log event entry.
......

what's the full error?

will look now.
Could not parse relay log event entry. The possible reasons are: the master's binary log is corrupted (you can check this by running 'mysqlbinlog' on the binary log), the slave's relay log is corrupted (you can check this by running 'mysqlbinlog' on the relay log), a network problem, or a bug in the master's or slave's mysql hosting code. If you want to check the master's binary log or slave's relay log, you will be able to know their names
by issuing 'SHOW SLAVE STATUS' on this slave.
My other server hosting with almost the same config file works fine.

sounds like a problem transferring the log to the one slave then
issue a fresh change master so it re-downloads to a new relay log

the error probably stems from the log file not being created properly
since you said 'wants to keep trying to create...' I'm assuming it doesn't succeed
if it can't create the relay log, it can't read it, hence the error

yes. And if it was being put in the data dir (/var/lib/mysql) then it wouldn't have a problem. I've run a "reset slave", "change master", edited the relay-log.info to the right file (.//mysqld-relay-bin.000001 pos0) and run 'start slave' and within a second the error above shows and its relay-log.info is back to /var/run/mysqld/mysqld-relay-bin.000002 pos 235
/var/run is on tmpfs. I really don't want the relay log there...

you might have to explicitly set the relay-log option in your my.cnf. relay-log.info might just be generated from the config on startup
is this gentoo?

Hi, how do I get select/insert/update/delete stats from a ndb database?

nope, ubuntu feisty. I've just upgraded and the other server I just upgraded didn't have this problem.
There are no relay entries in my my.cnf

which means its using a default
which is why you probably want to set it explicitly

heya quick question, how do I display what collation a table is?

tibyke thanks

shabbs, Which variable sets this? I thought it was done my default with regards to the datadir. In this case its /var/lib/mysql/

the relay-log option sets the file name, though I'm not sure if you can provide a path with that or not

oh, a startup option

is there a way to select only the rows which have a username equal some other row?

_hp_, yes a join or if the same table a self join using an alias
or are you looking for dupes

hi all, i got no reply to my mailing list query at http://tinyurl.com/ytw5fw, someone must have a clue, if you do, please let me know, thanks

hi... is there any way to list stored-procedures and functions that has been created?

Use INFORMATION_SCHEMA or mysql.* tables directly

mysql -u usernameHere -p passpordHere sqlfileHere - but that asks for the password after i press enter when i type it into the shell. is there any way that wont ask me for the password?

lol oops its not the password that goes there its the databaseName

-ppassword
correct

when i've seen problems like that, i usually needed to upgrade the GNU autotools binaries

hi, is there a way to insert a random string into a column in mysql?
(or random-ish) =]

Hello all, I am having some trouble with aes_encrypt. If I base64 encode the results from the mysql function, it is different than the output of openssl enc -aes-128-ecb -base64 -pass pass:password - anyone know what I might have done wrong?

can i tell it to select * but not this column?

ok, i've found something. i'm going to use this - SELECT LEFT(md5(UUID()), 10)

no, don't be lazy
!tell illegalc0de about evil

illegalc0de evil is clearly defined at http://www.parseerror.com/sql/select*isevil.html

well my table has about 30 columns and i want to select all of them exept 2
well its a joined table

well there is still no way to do that

ok ill have to tell it to select each one

if it's joined you could say select a.*, b.field1, b.field2 etc

should a phone number be stored as an int or a char ?

depends

your phone numbers don't have 0's infront?

char if you do (044) 6868686868

phone numbers should be stored as NULLs

Can we use DISTINCT more than once in same query ?

email and skype ftw!

no

depends on what you want to do with the phone number. we store LOTS of phone numbers and do lots of queries on them, so we store them as numeric data types, and split out the area code from the line number (mostly US/Canada numbers). if you only use it for display, then varchar is fine.

INFORMATION_SCHEMA doesn't return the parameters required by the functions. Any way to get it?

Hi all, I'm having a problem with a query that works through the MySQL console but fails when executed via Connection/Statement/ResultSet. Would anyone be able to tell me what's going on? Details follow...
mysql Ver 14.12 Distrib 5.0.21, for Win32 (ia32)
http://pastebin.ca/564148
MySQL Connection version 5.0.3

SHOW CREATE FUNCTION is the best to get all the information about particular function

when I do a select I get data like bob12 and bo33 etc. I want to strip off the numeric part in my query, is there a way to do that in sql?

bibbybob, are they all different char lengths and what does the chr part mean

hi all, my mysql logging seems to have stopped, it used to log all activity except slow querries to /var/log/mysql/mysql.log but not anymore, error logs not even going to syslog?? I havent changed anything in my.cnf since it used to work? any tips?

tls_81, run out of space

? no there is about logrotate rottating logs on a daily basis...
is that what you were reffering to?

I have converted all the database in my server to InnoDB except the MySQL database. Any reason not to convert the MySQL database to InnoDB?

yes leave that alone

oops * not very clear... There should be enough space in the directory where logs are... and they are rotated regularly...

amazon fulltext does not work in myisam

It doesn't?

hehe innodb
a mere slip

you were sort of right the first time ;-)

true

Yeah, if you converted the mysql DB to InnoDB, the server won't start.

ok, I was using MySQL-ZRM to do a logical back-up(binary logging) and MySQL ZRM chokes on the remote mysqlhotcopy commands.

Shrews I never use it

so I was hoping to have everything InnoDB, so the back-up would complete
thanks, I'll go debug why MySQL-ZRM ssh copy to mysqlhotcopy doesn't work then

sorry I didnt quite understand when you said "ran out of space"

tls_81, there will be no writing to logs if there is no space to write it

greetings

There is sufficient space in my /var/log do you think it could be something else? the "log = /var/log/mysql/mysql.log" option is in my my.cnf... am a bit confused as to why it's not working...

tls_81, has an app switched them off via the set commands
eg an intruder

when I do a select I get data like bob12 and bo33 etc. I want to strip off the numeric part in my query, is there a way to do that in sql?

bibbybob, are they all different char lengths and what does the chr part mean

yes they length of the characters varies and the char part is just a hostname that changes and has numbers

messy

hrmm

!man string fu

see http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

there is no way to do bust out some regex powa?

regex is only for matching in sql

are the string functions also available in 4.0?

!man41 string fu

see http://dev.mysql.com/doc/refman/4.1/en/string-functions.html

do you think and intruder has stopped mysql loggin using the set command? is that what you were refereing to?

yes

eg an intruder

sorry
SET SQL_LOG_BIN is what they would have used?

hello all
Access denied for user 'root'@'localhost' (using password: NO)
why is this ? can someone help ?

Your root user has a password that you did not specify.

seekwill, how can i see the root password for mysql ?

you will have set it when installing mysql...
u need to use the -p flag once you know the password...

tls_81, my sql was installed by default with my distro...

what distro is it?

tls_81, slackware.. but nevermind i got it

ok...

tls_81, by the way is it adviced to use root when creating tables. and so ?
tls_81, or should one use a normal user ?

u can use rtoot to create tables, but it's best to create a diffeeent user to manipulate tables and data later on...
ie restrict user to a certain database...

is there any way to merge select and insert query
i take some infos from another table with a select query and run new insert query
can i merge them in a query?

!man insert select

see http://dev.mysql.com/doc/refman/5.0/en/insert-select.html

thx archivist
i think, i cant prepare a query with some of values from db, some of values from my code.
is it true?

so just add the constants/whatever

thx archivist..

hey folks, I have an "invoice" table and a "package" table. I want to query the invoice table and get the "invoice_date" which is int(10). Then i want to left join the package table and get the "duration" which is int(10) and add it to the invoice_date to get the "expiration". Is it possible to do this all in a query, and have it select only the results where the expiration is less than the current time ?
I was thinking... "where (i.invoice_date+p.duration) $time" but i dont think that will work?

Noel4DMB, that looks right

so you can actually add or subtract field values in the where clause like that?

Yes

sure. but you mentioned LEFT JOIN, perhaps you need a INNER JOIN instead. in fact it might make no difference, but theorically seems more likely what you want.

yeah, i want to find all of the invoices that have expired based on the date they were purchased and the duration of the package they ordered. I was afraid i'd have to do the logic in PHP with multiple queries, but it looks like I can do it this way much easier

what's the right usage of "more likely"? "seems to be more likely what you want"? does it sound right?

if i have 2 indexes in a table can i then use both i same query ??

usually not, but depends on query and server version

Turt|e, maybe you need a composite index

hm dont think im in luck then,

as archivist says, make a composite/covering index

yeah, i have to do that then, i could have used them separated thou

sometimes you just need more indexes to suit the app

joining on a varchar column is bad eh?

yeah, =/

what is the LOAD DATA LOCAL INFILE command for mysql 5.0.24a?

not always, but mostly yes

hmm
i have this query which is running incredibly slow.. that's the only reason i can figure

explain it

i'll post it in a minute to a pastie

LOAD DATA LOCAL INFILE

ERROR 1148 (42000): The used command is not allowed with this MySQL version?

probably because it's disallowed either by server or client setting

pCarsten_, how do i see that ?

http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html

pCarsten_, i did GRANT ALL ON menagerie.* TO 'your_mysql_name'@'your_client_host';
pCarsten_, isn't this enough so that the user has all rights on that database?

RTFM

pCarsten_, ok , thanks

hi all
i have a question i have a redhat el4 server(4cpu dual core) running mysql. If I run top and hit "1" I see that mysql utilizes 100% but only cpu0 and cpu1 utilize up to 30% CPU Time. The other 6 cpus remain at app. 0.7% I belive that the mysql server is misconfigured, but i cannot really find information on how to utilize multiple cpus on the mysql website
can anyone point me into the right direction?

One query == One thread == One core

s/query/connection/

I think I heard Oracle able to defy that logic though. But most applications run in a similar fashion
Well, you only run one query at a time, right?

there are such things as INSERT DELAYED

ah

is there a function to tell me how much two strings look alike
as some float, or lexigrapic distance or whatever
alike("foo","foof") would be say 0.8 alike("foo","fogg") would be say 0.4

you're thinking levensthein distance(sp?) -- and no, mysql doesn't have it

or something simmilar?

soundex is there, but that's of course not the same thing

say I want to select all people with names simmilar to "smith", and sort the results so that most simmilar are on top

no magic bullets for that

damn
so what would be at least near that?

what's a good paste site for sql?

so seekwill what you are saying is that, because i have an application server which sits in between me as a DB Server and my Webserver, and because that Appserver (JBOSS) only opens 10 Connections, the mysql server only utilizes its first cpu. Correct?

like one that'll handle wide query outputs without clipping

No

pastebin

try http://pastebin.ca

ok

how to match strings that contain "foo" in them?

raf256, where c like '%foo%' ?

mhm

full text indexes

MySQL will create a thread for every JBOSS connection. It's up to the OS as to how to handle it. Usually the OS will run each thread on a different core.

does soundex work quite correctly for UTF8 non english words?

is there a way to verify that?

What OS are you running?

redhat el4
linux per say

Why do you think you're only using one core?

http://pastebin.ca/564367

milestone, a slow query will show up on 1 core easily

I will enable slow query logging this night
cannot do it now
production server

That doesn't really mean much. Is it a "busy" server?
What does SHOW PROCESSLIST show?

only the 10 jboss connections
most of the sleeping
that is why i am sooooo puzzled

Why are sleeping connections puzzling?

and i don't understand why mysql is eating up cpu power and mainly on one cpu

Because it's probably crunching on one query

yeah
and i believe that the slow query logs will reveal the bastard

when your browsing a table... under the type section... is there a selection under their that will mask that feel... kind of make it look like a password

So will SHOW PROCESSLIST
lol

i will keep hitting the command
thx anyways

I am trying to select the most recent invoice from each user, but it keeps giving me the first invoice rather than the most recent. Can anyone help me figure out what's wrong with this query: http://hashphp.org/pastebin?pid=21989

lemme guess you're using a group by (didn't read paste)
probably should I guess before I assume things :P

yes
lol

!m Noel4DMB groupwise-max

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/groupwise-max

ugh

groupwise max

http://jan.kneschke.de/projects/mysql/groupwise-max/ http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html

that's the one
bitch

thats a !tell

yeah

http://pastebin.ca/564377 trying to figure out why my GROUP BY is soooo slow. queries and explains included

0"

This script along with the php/html code below should print out the apartment type from the database into the form field. please refer to http://pastebin.ca/564384 anyone

Why does the group by take the lowest row?

robcole, hint echo your $query

I have 4 invoices for user #1. When i Group By userid and order by invoice_id, it always picks invoice #1

Noel4DMB, its not fixed there is no defined order hence see the link we gave you

archivist the it prints SELECT apttype.apt_type, statustype.status_type FROM apt LEFT JOIN apttype ON '4' = apttype.apttype_id LEFT JOIN statustype ON '2' = statustype.status_id

sorry, that should be "order by invoice_id DESC"
Im not sure i follow those docs. It looks like that code gives you the max number found in a row
Im trying to get one row from each user, eliminating older rows from the results

Hi all, I have a correlated subquery that works on the console but not through Connector. Anyone know why this might be? Details are at: http://pastebin.ca/564210

hi
how can i prevent replication of triggers and sp?

archivist you there?

yes

archivist the it prints SELECT apttype.apt_type, statustype.status_type FROM apt LEFT JOIN apttype ON '4' = apttype.apttype_id LEFT JOIN statustype ON '2' = statustype.status_id

dont quote numbers
and joining on constants?

the numbers are the values for the feilds
apartment types i mean

use where

in the html script to relate to the database. so it prints the the value in the database that has the id of 4

where field=4

yeah

how can i prevent replication of triggers and sp?

any reason why this shouldnt be working?

If mysqld is locked up (due to hardware failure) will the mysql client time-out a query and return an error, or sit waiting? IF it times out, where is that limit set?

hi
how can i select a range of dates? i am trying to use date_format('%e/%Y', date_var) = '6/2007' and same thing with = '7/2007' .. doesnt seem to work properly

does anyone know how to search for unicode characters using the mysql commandline client?

What's the difference between doing SELECT .. FROM a INNER JOIN b, c, d ON ..; and doing: SELECT ... FROM a INNER JOIN b ON .. INNER JOIN c ON ... INNER JOIN d ON ..;
or which is more correct
avium, Most non-ascii UTF-8 characters has one or more initial bytes that might help you spot them
avium, for example, Arabic characters always begin with 0x81 or 0x82 iirc

Latter is "more correct"

avium, so with the help of the string functions (http://dev.mysql.com/doc/refman/5.1/en/string-functions.html) I believe you can match these characters
seekwill, probably :-)

It's a lot easier to read.
and understand.

oh you mean my question

archivist, any other queries so i could solve this?

seekwill, I agree, but internally, are they any different to mysql?

i can't figure this out, the docs aren't clear to me. When I use "Select Distinct i.userid" it gives me one row per userid. But when i select a few more values it gives me all of the rows for that userid. What's happening?

Order of operation changes in 5.0 might cause the first example to act "funny"

seekwill, oh so it's more correct (sql syntax wise) to use the second example?
useekwill, oh so it's more correct (sql syntax wise) to use the second example?/u

DISTINCT works on the entire row, not the one field
it removes duplicate rows from the resultset

right... but how do I select the other values I need?
http://pastebin.ca/564461

Subquery

you have to decide which rows you want to pick. If you have something like this: row1: 1, 2, 3 row2: 1,3,5 and you select distinct(field1), field2, field3 (ie, you want only distinct field1s to show, plus all other rows) how is mysql supposed to know which of the 2 rows you want it to pick for the other fields?

Use either the comma join or the JOIN syntax, but don't mix the two. One is not "more correct" than the other and is only a matter of personal preference.

can you show me an example of what you mean?
I havent worked with subqueries before, joins usually always do what I need them to

Shrews, Both are JOINs ;-)
it's just, 1 JOIN with many tables, or 1 JOIN for each table?

both are joins, but different syntax
FROM a, b -- comma join
FROM a INNER JOIN b -- JOIN syntax

Shrews, oh I see
so I guess that makes the INNER JOIN syntax definitely the winner because in my first example I was mixing JOIN syntax with comma joins
Thanks guys!

i have a radio button field

Shrews, a comma join is an INNER JOIN, right?

how do i declare them?

how can i prevent replication of triggers and sp?

date bool NOT NULL

as long as you specify a proper WHERE clause to join them, yes

Shrews, I see, thanks again

sense of humor mandatory

At least people read the topic

why

Because they put important information in there.

do you like that?

Of course. That's why I stick around.

long stick goes boom
do you seek will, seekwill?

nah he is advising us to 'seek will'
he/she*

yes, let's seek will.

why do you call yourself alienbrain, if you are human?

karloo, dunno, people used to call me 'weird' and all..
until I quited school..
and now sitting unemployed..
.... j/k. :p

poor alienbrain

hi

coder:why?

does anyone know how to do a mysql database integrity check? ie: you just migrate a database from one host to another, how to chekc everything was migrated?

why

why what? the nick?

"the nick"? nick cave? nick nolte?

nick cassavettes

is there away to only get the Field column when using DESCRIBE?

poor coder

heh

SELECT Field FROM DESCRIBE table; - except that doesnt work

karloo lo sabes o que?

why

ok, you're bored

no
nick coder

Is there a way to log all sql transactions?

mysql -u usernameHere -ppasswordHere dbnameHere sqlFileHere - but it doesnt want to add the data/disconnect

heh

him again sigh

always .ch ?

same idiot
yup

does anyone know how to do a mysql database integrity check? ie: you just migrate a database from one host to another, how to chekc everything was migrated?

might find something useful in the MySQL Toolkit http://sourceforge.net/projects/mysqltoolkit/

hi everyone, i'm looking to make every field in a column of select equal to a max() from a subquery
anyone know how to do this?
that was probably really hard to understand, let me try again
i want to write a SELECT statement sort of like this:

pastebin

try http://pastebin.ca

thanks
brb
http://pastebin.ca/564559
anyway to do it?

so you want every row in table1 to have the same value for this column, and this value is MAX(score) from table2?

yeah, that's it Shrews

UPDATE table1 SET max_value = (SELECT MAX(score) FROM table2);

oh, Shrews, i don't actually want the table in the database to have the value
only the 'table' coming out from the select statement

so only the result set

grrr, I hate date/time comparisons

yeah, only the result set, Shrews

!man replace

see http://dev.mysql.com/doc/refman/5.0/en/replace.html

anyway way of doing that?

try SELECT * FROM table1, (SELECT MAX(score) FROM table2) AS a;

oh, okay, sounds good, didn't even know syntax like that was legal
thanks a lot Shrews

Shrew rightondev_ a bit slow maybe
may be better to do it in a previous select

personally, i would just select the max value first, then use it in another select
but he's only joining against a table with one row, but whatever

hm..

archivist, won't the second select be done once?
why is it slow?

once per row likely

ohh

derived table, though

its a try it and see

how can I tell that wether it's queried once or for each row?

for a derived table, mysql should build a temporary table only once and use that

http://pastebin.ca/564603 but I can't identify
Shrews, if the derived table used a column from the table1, say in a where clause, then it'd for each row, right?

subqueries in the from clause cannot be correlated queries

ohh

correlated queries are executed for each row in the outer table
which is why subqueries in an IN clause suck, b/c mysql makes them correlated for "optimization"

even if they're not correlated?

oops. correction: "Subqueries in the FROM clause cannot be correlated subqueries, unless used within the ON clause of a JOIN operation"
wonder how EXPLAIN treats that...

groupwise max

http://jan.kneschke.de/projects/mysql/groupwise-max/ http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html

check those links

but it's not the same as if it was in the WHERE clause in the subquery, right? I think that it'd first select everything from the derived table and the JOIN ON clause...

the above link talks about this style of queries and how to write them right

and then** JOIN ON clause

what was command to send from PHP to mysql so the charset would be right? Something "SET charset or ??"

thanks i'll take a look weigon

aa^way: see SET NAMES in the manual

yep, but can a subquery that builds a derived table be correlated?

either it is correlated or not. If not, a derived table is built
as you see in the examples the Optimizer could rewrite the query himself and solve the problem
currently it doesn't

6, can I compare it in a query like this: "SELECT * FROM `fby_events` WHERE `date``$now` AND `visible`=`1` ORDER BY `date`
$now is the current timestamp in the same format

now() works, no need to get it from the application.

wont that now() be interpreted by the php engine?

!man now(

see http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html

CerebroJD, it's within the string, so it's part of the query, just like SELECT, and is going to be interpreted by mysql

hmm
ok

anyone know the "show table" equivalent in ms sql?

hey, if i use set and set a variable, what is the scope of that variable?

GhettoJava, this channel is named #mysql, rings a bell?

rightondev_, @thiskindofvariable are global and available per connection

Ghettojava... this nick alone is embrassing
+ar

is there a way i can set a variable to only last during a select statement?

can't you perform another SET @var = NULL;

that's true
if i'm using persistent connections with a php frontend is there anyway some sql statement could be called inbetween the setting and unsetting of the variable?

Getty, lol
tibyke, many people I know use more than one db
and some here may be migrating to/from mysql
So I gave it a shot
and I meant "show tables"

rightondev_, I'm not sure how persistent connections work, but I _guess_ that there is One pconnection per script, so two concurrent scripts would have their own connections. the diff is that once the script is over, the connection would not be closed and used by the next php script. just a guess 'tho.

thanks garotosopa

if someone would tell that he know about mssql, there would be more and more people coming here asking questions.. we cant allow this

Is there any way to do an INSERT into multiple tables?

no
domas!

Can I change the charset for all the fields in the database, at once?

with triggers

How does that work?

you'd have an insert trigger on table A which inserted whatever values into table B

hey shabbs

but it would have to be data the trigger can get at, either stuff that's going into table A or stuff available in other tables
hey Daveman
or constants

what is the command that I should use to index my database?

www.mysql.com/create index

thanx

how do i throw radio button values to mysql?

mysql does not know radio buttons
thats an app problem

radio button values = 1, 0

miracee:

d

http://pastebin.ca/564807 i think it's a sytax problem on my part due to the GROUP command not working as i expect, how could i remedy that?

hey all, i have a mysql table that has a record in it named timestamp and it is a timestamp type, what i would like to know is how i can easily select all from the previous month in a single sql query
also the abilit to specify the month would be helpfull to
ability

i *think* that is something that you would need to do outside of sql

has to be a way i can do it inside sql
i mean i can get everything in the past 30 days but that is not exactly what i was looking for

you can do like SELECT * FROM TABLE WHERE timestamp BETWEEN '2007-01-01 00:00:00
oopse
sorry, premature [enter]

np

SirFunk, you probably want the outer select as the subselect

so there is a between option

0' AND '2007-02-01

ok

but SQL has no idea what 'last month' is AFAIK

yea

you have to pass it the times for the previous month

I'm really likin' stored procedures.

how would that work?
i want the MIN usageWhen for each computerDivisionID

Does anybody use DIA for their ERDs? If so, what sheet do you use?

oh oh oh
you really want to right it down? or do you want to generate it out of the DB Structure live?
s/right/write/

nah, just a visual representation is fine.
I can draw it by hand
I need to make sure it's normalized, and print up some nice copies for my wall. I forget where everything is.

when I use a case statement in a select, can I cast the column as an int so it sorts like an int, rather that a string?

when i have the GROUP BY as the subselect it ends up having more than 1 row, which casues it to error

Sometimes.
It would be helpful to archivist and the rest of us if you pasted the query

i had pasted it

http://pastebin.ca/564807

http://pastebin.ca/564807 archivist said to make the GROUP BY the subselect, so i did that
i'll paste that too, maybe i did it wrong

seekwill? sometimes?

http://pastebin.ca/564851

Depends on the data. I believe it casts properly when the string starts with a number.
bDepends on the data. I believe it casts properly when the string starts with a number./b

sorry to bother your CAD Drawing, but is that what you meant by make the GROUP BY the subselect?
hmm... isn't cad drawing a little abundant?
"computer aided drawing drawing"?

Computer Aided Design drawing

ahhhh

seekwill quoting for a couple of thousand parts atm

For clocks?

no
we get allsorts here
excavator parts

?

small bits hex threaded bung, exhaust flange 3"

???

hmm needs a pic

Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
can anyone please tell me how to fix this?
i see you.

Hmm?

Kaepora, is mysql running ?

i'm Cyraq.

Oh, right.

i don't think so, let me check
not installed
i mean to say, not running

seekwill www.archivist.info/p6130001.jpg

Kaepora, you have to start mysql to run it
lol

seekwill note sick slow network at this end

you asked me if it's running, i checked ps and it wasn't.
when i type 'mysql' as root, i get the above error.

Kaepora, you have to start mysql

Wow, nice. Are you making it?
What is it for?

what do you mean?

how do i dump a users' table to a file ?
er db .. everything under that users name

seekwill quoting for 31 different parts (spares afaik)

Sounds like fun

You need to start the MySQL server, ie, run the program.

Kaepora, something like /etc/rc.d/rc.mysql start

goddamn it, when i try to run the program, i get that error!

No, no, that's not what I meant

Kaepora, are you using linux or windows?

linux

"mysql" is the client program that connects to the server. There's a separate command to actually start said server.

Kaepora, ditro?
Kaepora, distro?

Debian.
oh, i see

seekwill if you want to play cad cam on the cheap #emc and linuxcnc.org

Kaepora, try that command i gave you..

hehe. I have nothing to make

"drop table *;"

seekwill spares for the noo motor, when you break it

haha

how do i create a dump of everything a user can access from the command line?
into a .sql file i can inject back in to a new server

not found

Kaepora, do you have mysql instaled?

I need some serious help - this has been a problem for months - and i'm at an end -- i don't know what else to do - - if I can't get this solved - we are going to a paper database
locked mysqld

Hi..
how do i change the name of a table

iratik, elaborate

Daniels89:http://www.google.com/search?q=how+do+i+change+the+name+of+a+table&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a

aaaah

Try "/etc/init.d/mysql start"

it seems that i removed /etc/init.d/mysql by mistake

when a query is taking a while -- lets say over 5 seconds -- _no_ _other_ _queries_ _will_ _go_ _through_

ah

is there no way to somehow make mysqld act more like apache?

yeah, don't lock the tables

where it creates child processes to deal with extra loads?

Kaepora, invoke-rc.d mysql start

I am quite sure it does do that

i don't know how to lock a table - except for putting through a query that seems to lock up the database

what kind of table?

now .. i've already optimized the queries to ______death______ ... its as fast as we can get it

/etc/init.d/mysql start

invoke-rc.d: unknown initscript, /etc/init.d/mysql not found.

/etc/init.d/mysql start

He deleted it.

oh
Kaepora, reinstall mysql then

MyISAM
i mean --- we have these sick queries that we can't optimize any further -- we've even moved from using true cartesian distance to roughly approximated square radius distances on the geographical searches --- we can't optimize the queries -- or the my.cnf settings any more -- its inevitable that there are queries that are going to take longer than 10 seconds .. no matter what we do
we need other queries to be able to go through while those long queries are being executed

!man locking

see http://dev.mysql.com/doc/refman/5.0/en/crash-recovery.html

stupid bot

Horrible human

!man myisam locks

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/myisam locks

*sigh*

can someone please send me a working /etc/init.d/mysql?

is it the storage engine?

myisam uses table level locking

are there faster engines for larger scale deployments where scalability is a very importrant factor?

are you using a join?

yes... a very complex join

can you use innodb?
it does row-level locking

what are the factors to consider?
whether i can switch storage engines to innodb?

increased data size, slower performance on avg
well, the latter depends on certain things
are you using fulltext searches at all?

no

ok

data size is irrelevant for our environment -- what i would like is row-level locking and faster performance on avg

unfortunately you'll probably have to benchmark it yourself
how it works with your environment

welll... we've got benchmarks --- but is there a page comparing the features of all available storage engines for mysql 5?

some with locking issues had great success with switching to innodb, others said myisam is much faster on avg
!man engines

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/engines

!man engine types

Sorry - I have no idea what function you're talking about! but try http://dev.mysql.com/engine types

gah
!man storage engines

see http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html

there

mysql -u root init.sql; init.sql has use aaa; and database aaa exists. and it says : ERROR 1049 (42000) at line 1: Unknown database 'aaa;'
ah trailing ;
maybe im doing it wrong
theres only 1 ; after use aaa

I'm down to InnoDB vs. BDB -- any recommendations -- extremely high rate of inserts ... relatively few indexes for each table

what's extreme?
http://www.flupps.org/pics/mysql_inserts.jpg

a few every second seems extreme to me
either updates or isnerts
but look at this
http://pastie.caboo.se/70204

so, your problem is that updates wait while you're doing table scans on selects?

there aren't any tablescans happening there on the selects

a few every second seems extreme to me

lol, that's idle.

wel... its causing problems
all i know -- is everything is locked
so i'm going to go ahead and switch over the storage engine to BDB

indexes?

the assumption that the tables are improperly indexed is a faulty one

I'd probably switch to InnoDB over BDB

it's not fault, it's a coin flip
faulty*

we've spent the last 6 months, optimizing to death everything - the database.. the my.cnf settings and so on
the only thing we haven't considered was the storage engine

give innodb a try
if it doesn't work you can always switch back
or to something else

sure, don't get me wrong, it'll help, i was just asking :p

thanks tho --- would clustering be an option for speed and fewer locks?
is there any way to switch the storage engine for a db as a whole - or do i have to go table by table?

you could replicate and do all the reads off the slave(s)

i'd start with the problem table first, you know innodb doesn't support all the features of myisam right?

though you'd potentially be reading out of date data
and it might do the same thing on the slave too

it doesn't always help, usually it's a good idea to know why you're having lock issues before you jump into throwing hardware at a problem

so it might not be a valid option either

hmmm
i wish i knew why i was having lock issues
so many web apps running off one instance of mysqld
its hard to pinpoint

anybody know how mysql decides that it's going to need a massive tmp table when it really doesn't?
you getting allot of IO wait or anything? enough thread cache?

i don't know what those mean

from your paste it seems like you're doing a select which is taking while (you said it had a JOIN) and the updates are waiting for it to finish before they can fire

that was why i asked about indexes

hmmm
let me work some more on this

though the select is waiting for update/inserts not the other way round

Hi, I want to know if there's a way to make this kind of query:
SELECT * FROM (
SELECT positionInThisResultSet, COL1,COL2,COL3 FROM Table ORDER BY COL1
) ORDER BY COL3
only thing I don'T know how to do is the position in a result set

What's the difference between ALTER TABLE t ENGINE , and ALTER TABLE t TYPE ?

none .. ENGINE and TYPE are the same

alright -- does changing engines take a long time?

though type is being deprecated though

TYPE has been deprecated and will not work in 5.2 and beyond.

yes ... well your entire data needs to be copied

What difficulties might I face switching from MyISAM to InnoDB in terms of handling the inserts and deletes on a database?
Only the transaction stuff?

depends on what you mean by 'difficulties'

imme loss of fulltext

Hmm o.k. thanks archivist.

imme you dont have to use transactions in innodb

how do I load a sql file from commandline or mysql prompt?

is there an easy way to copy one DB w/innodb tables to another? i want to copy my dev DB to a test DB

glen_quagmire, mysql -u uname -p dbname bla.sql

mysql -uUSER -pPASSWD schema db_file.sql

we just moved from 4.1 to 5.0 and we now can't login to mysql as root remotely - are there some new security features as part of mysql 5 that prevent remote root logins?

so i cant specify use db_name; inside bla.sql

Does anyone know of anybody running MySQL on an 8 way? I hear anything past 4 way and MySQL just doesn't do well.

i bet it depends heavily on the OS

On linux

probably primarily how it handles threads
just trying to think if our old server was 4 or 8
nope, i got really bad memory

I hear it's blazing on 8 way opterons

I hear that too, but the woodcrest looks like it might give opteron a serious headache.

not for long i suspect

http://tweakers.net/reviews/657/6

is it me or does that show ddr better than ddr2?

I'm reading the whole thing now... but I need to eval hardware. I'm wondering if my initial idea of a HP DL585 with 8 opteron cores was a bad call.

i suggest that it'd pound on a dual quad-core intel :p

http://tweakers.net/reviews/657/5
I'm not trying to flame - but holy cow on the pg numbers.

can't understand what those numbers are supposed to mean, they look a bit abritary

hiya

well, there seems to be no one here who's able to solve my problem, so do you know any other places (forums?) where I can ask for help with mysql queries?

hey, does anyone come across any idea why some of my virtual mysql users can see all the databases and some are working correctly and showing only their own databases?
It's a massive security risk because they can dump all the db's eventhough they can't view them
I haven't found any differences on mysql-db user-table

what does SHOW GRANTS for each user show?

mysql's forums maybe.

one sec

bigpet, your question doesn't make a lot of sense, what is the position in a result set?

is there a way to see the users grants when logged as root to mysql?

show grants or select from the mysql.* tables

SHOW GRANTS FOR user@hostname;

yup

brb

`owndb`.* TO 'user'@'localhost'
why is there .*?
is that normal?
this is one example of the users who can see all the dbs
alrighty,, I have found the difference
are the grants saved to the mysql-db?
or where are they saved?

you can use revoke to remove privileges

revoke?

!man revoke

see http://dev.mysql.com/doc/refman/5.0/en/revoke.html

you can't revoke USAGE
and USAGE simply means they can see the db, but they can't do anything else with it

HarrisonF sorry but I mean the position in the resulting table. Like You SELECT something and ORDER BY points and then you want a column which says 1 for the row with the most points
this wouldn't be any difficult but I want to sort the resulting table by something else

use a user variable
!man user variables

see http://dev.mysql.com/doc/refman/5.0/en/user-variables.html

are the grants saved to the mysql db or somewhere else
?

ok thanks I'll look into it

mysql db yes

mysql/user?

depending on the privileges it might be in different ones

such as?

db level privileges go in the db folder
ack
s/folder/table/

hmm.. I think the db's are broken, too
I've got "overusage" or something like that in enlish
english*
What's the command for fixing the whole mysql at once

if only

lol

The "make it work" command.

'Abracadabra'?

man, i hope mem stats are going to be implimented in the profiler soon, that'd be killer

no, there is one command for fixing the broken mysql dbs
I have used it

if you've borked your mysql admin db, perhaps doing the mysql_install_db is what you mean? Harsh step though.

heh

repair table command for all
no one remembers the repair table so that it checks all the tables?

I tried moving a database with mysqldump and then by importing it
through source file.sql;
creating the dump took about 3-5 seconds
and it's about 730 MB
now when i tried to import it

you must have some really fast disks,

maybe it was 10 or so sec
it wasn't long
but the import with source
took +4 hours
is there a way to speed that up

yeah, well it has to recreate all the indexes. yes read the mysqldump options, it cna add locks, use bulk inserts, etc
(e.g. so index isn't added to for every insert, just after all inserts ar edone)

ahh!
that would speed things up

/nick dsl

we can't all have three letter acronyms starting with de seekwill

you're killing my eyes

I think the fucking table was broken
it caused the users to see all over the place
for fuck sake

mysqld...failed.
/usr/bin/mysqladmin: query failed; error: 'Lost connection to MySQL server during query'
/usr/bin/mysqladmin: shutdown failed; error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'
i think i just broke it
i ran mysql_fix_privilege_tables
because i was being stupid not because i needed too

How do I give different columns different weight in a full text search?

oh yeah, and I found the command that fixes the whole mysql at once

something is clearly wrong with this query, as it is taking forever to run. can someone more experienced tell me what is going on here? http://sial.org/pbot/25553

No. But I can. Check your indexes. Use YEAR(s.DATE_SOLD)=2004, not the string % compare.
Same for the other date comparisons.
WHERE YEAR(s.DATE_SOLD) BETWEEN 2004 AND 2007
Reconsider your use of aggrgation.
aggregation.

ah, thanks
problems with the grouping?

Your select list doesn't appear valid, in the context of the GROUP BY.

okay, I'll investigate that. thanks!

scruffy, take a look at all the date and time functions

This really depends on whether part_number and material_number represent unique keys into your tables.

Xgc doesnt year() stop the use of the index as well

As far as the dates are concerned, sure. But the joins may still see a benefit.

hi

i have a problem w/ an eggdrop script that uses mysql

don't ask me
hehehehe

it only responds wen i type it on the pc with mysql
and the bot
what could be blocking it?

Try debugging the program, looking for specific mysql errors. Post them to a pastebin and then show the URL here.
Firewall, grant issue, etc.

i have no firewall
so what kind of grant should it be?

Any normal connection related problem could be in play.

can some1 help me with a sql statement

A grant that allows the client to have access to the proper database from the required host.

im trying to get the total count of unique referrer_ids
select sum(id) from ht_raf_friends group by ht_raf_referrer_id
and I cant seem to get the right sql

Use count, not sum.

even if i do that its just giving me a count of how many times that referer id appears

SELECT COUNT(DISTINCT id) ...

i just want a number of unique referrer_id's

id or referrer_id?

hi, could someone tell me what i need to do to query multiple tables for one entry?
or at least tell me what its called when you do that?

referrer)id
select count(distinct ht_raf_referrer_id) from ht_raf_friends group by ht_raf_referrer_id

SELECT COUNT(DISTINCT referrer_id) FROM tbl GROUP BY blah;

that just gives me a series of 1's
vs a total

If you still have questions, you really need to show the schema, data and a better description of the required result .vs. the current result.

i'd like to do something to the effect of "SELECT * FROM * WHERE some_condition"

Can't.
Use a UNION or something similar.

so, what would i do instead of that?

or fix your schema.

how do i just delete the entire database and statr over from scratch?

You may benefit from a full_text search.
DROP DATABASE dbname;

oh okay, so i just do SELECT ...... UNION SELECT......

mysqlquery/db server: MySQL server has gone away

how can i tell what table the result comes from?

Xgc the statements almost there the problem is its not giving me a total its just giving me 2000 rows with 1

You can add a derived column to each select.

whats that error mean?

SELECT COUNT(*) FROM (your other select here) v1;

no i want to erase /var/lib/mysql and start over completely

Xgc thanks

??

Change that to SUM(blah), if you want to sum the other counts.

http://dev.mysql.com/doc/refman/5.0/en/packet-too-large.html

SELECT SUM(cnt) FROM (SELECT COUNT(DISTINCT blah) cnt FROM tbl GROUP BY field2) v1;

whats the v1?

how would i add a derived column?

Correlation name or derived table alias.
(SELECT 't1', ... FROM t1) UNION ALL (SELECT 't2', ... FROM t2) ...
revelation1114" The 't1' doesn't need to match the table name. That was just an example.

okay
and the UNION ALL will add the derived column....?
im not entirely sure how this derived table thing works

The UNION ALL just unions the result sets of the corresponding selects.
There are restrictions here. Yo need to understand how union works.

okay, i think i do...the UNION ALL just makes both SELECT queries showup as one, correct?

Yes... and doesn't remove duplicate results.

understood, now how can i tell which table the results came from? do i need to add something more to my SELECT query?

Each row will have the 'derived name' value you added to that particular select list.
If a result came frmo t1, 't1' would be seen, based on the example I gave you above.

whats wrong with this statement
SELECT sum(cnt) FROM (SELECT COUNT(DISTINCT ht_raf_referrer_id) cnt FROM ht_raf_friends GROUP BY ht_raf_referrer_id);

ah, i think i understand

You forgot the ailas v1.

so i can preform another query on that result and get the table name by itself?

SELECT sum(cnt) FROM (SELECT COUNT(DISTINCT ht_raf_referrer_id) cnt FROM ht_raf_friends GROUP BY ht_raf_referrer_id) v1;

whats that do?

Nothing important here. It's just required.
It's the way you refer to fields of that derived table.

im getting a syntax error
syntax error at or near "cnt" at character 65
In statement:
SELECT sum(cnt) FROM (SELECT COUNT(DISTINCT ht_raf_referrer_id) cnt FROM ht_raf_friends GROUP BY ht_raf_referrer_id) v1;

Show it.

Xgc punishes the unfaithful by skipping the use of the phrase 'AS', which isn't required.

What does: SELECT version(); return?

fuck dude im so sorry
im using a stupid postgre table
im so used to using mysql and using this resource

No problem.

sorry to waste your time

The idea is the same.

however i woulda thought that woulda worked

As threnody points out, pg might be more restrictive.

;^)

MySQL allows some non-standard fluff.

you need as cnt on your subquery
"as cnt"

ok
nice thanks xzilla

sql spec says the as is optional, but it is required in postgres

is there anyway do run 2 mysql servers over shared gfs storage?

*gasp* PG does what???

It's not required.

it 0wns your momma!

insert into ('dog', 'cat'), ('fish', 'tree'); is pretty bogus sql-wise, too.

...

oh, I understand it is not required.

In some cases it is required, just not this one.

how would i perfom a query on the result of a query?

One general way is this: SELECT ... FROM (... your ugly union query here ... ) AS for_threnody WHERE for_threnody.blah5;
or use a view.

evening!

and, the AS is not necessary, right?

MySQL might impose some limitations on views. I haven't kept up with the latest adjustments.

Xgc you know what would be nice

Only if you're talking to threnody.

being able to make some kind of foreign key constraint on column names... i know you can't make constraints over DBs, so i can't make a constraint to the information_schema db... but somehow this would be useful

lol

you think there could be some lower level functions to do this?

well, i just want everything in the derived field, so i dont think i need AS or WHERE

Well, your question suggested you wanted to "query" the query.
If you just want the query, you don't need to wrap the union.
That could be expensive, to allow constraints against views.

i only want the derived table field from the response; would i not have to "query the query" to get that?
or is there another way?

You just want to know which tables had matches?

correct

lol, I was off doing 'insert into (user) values ('glass of wine'); query successful!

Then just: (SELECT 't1' AS d_name FROM ...) UNION (SELECT 't2' FROM ...) ...
The d_name column of the result set will contain your list of tables.
Without the [ALL] keyword, that should be a distinct list as well.

ah

There's a tradeoff here, depending where you place the criteria, inside each (select ... where ...) or once outside them all.
If you place the criteria outside, you have to return all the necessary data from the union selects.

well, there will only be one return or none, the way things are put into this database

you generally cannot rely on such logic with databases :P

how to delete all tables that are in a database?

secureT, drop the database (loses stored procs though)

but drop *; isn't possible

no

ok thx

well, i'm writing a php script, so i can just make the script stop if more than one record gets returned from the UNION query

How would I select a numeric value such that it's formatted a specific way (say, two decimal points)?
bHow would I select a numeric value such that it's formatted a specific way (say, two decimal points)?/b

lol
look at format()

Danke.

prego.

hi all
how much must be my php buffer size set up ? i use much php+mysql some online games and work for online Scores "points"
how much must be my mysql buffer size set up ? i use much php+mysql some online games and work for online Scores "points"

What is the default name for log files made by mysql? The files I have here appear to be binary?

!man binary log

see http://dev.mysql.com/doc/refman/5.0/en/binary-log.html

if I tell it to record the general log, will that slow down mysql much?
Also should I have it keeping a general log (for security auditing etc) or is the binary log sufficient?
Lastly, is there a tool to view the binary logs?

Yes

Is it bad to have an ENUM column with just one-char entries?
I have a status column for my users table that can be A, M, B, etc.

Some say it's bad to have an ENUM column

At all?

That's fine.
Yes, since it is not a a standard.

Why would ENUM be inheritly bad?
Oh... this is not in the SQL standard? :|
Well... it must be better to use an ENUM than a CHAR(1), right?

there is a lot of stuff that isn't in the starndard

standard is pointless if you don't plan on migrating to different db server.

an enum will always be storaged in the best way

Not really

Yeah... seems to be that ENUM is STORED as an int.

There is more than one way to store an ENUM?

And thus must be faster/better.

seekwill, yes

SMALLINT, iirc
What ways?

one or two bytes

the only drawback to enum vs char is that you have to alter the table to add a new option

There are like 500 different table options which I haven't explored. :/
And several ways to store indices which I don't understand.
I only understand PRIMARY and UNIQUE.

don't worry, I've used mysql for a decade and there are still amny parts I don't understand.

Oh, and INDEX of course.
dkr:

What are correct permissions for the phpmyadmin directory in /var/www ?

For some reason I like really old database systems.
777. I use 777 for everything when in doubt!

No. Insecure - and it won't start if it's insecure

First time I saw somebody reply to himself. =/

phpmyadmin only needs read rights for the user the webserver runs as
not anything more
it isn't slef modifying

I must tell you I find Unix file permissions a pain.

Woops

Luckily I don't have users poking around my server that might cause trouble when I use 777.

let me tell you a seceret, linux have supported Acls for years

Advanced cardiac life support?
Or American Council of Learned Societies?

access controll lists

=Z
Never heard of that.

that is what windows uses in ntfs
you say who can do what

Isn't that chown?

and you get to have multiple users and multiple groups
chmod lacks the multiple part

hi, is there a quick way to dump all table schema in a certain database?

(note, requires special mount option, use at own risk for /)
Qiang, mysqldump

Well, I use FreeBSD and everything seems to be a little harder than the popular Linux distros.

as a linux user and FOSS advocate it pains me to admit the NTFS' implementation of ACL is far superior to that of any of the *nixes.

oh, i thought mysqldump is for dumping the data and schemas. checking..

--no-data or some such.

yeah, it got a switch to not dump the data

--no-data it is.. thanks.

I highly recommend MySQL Administrator.

I meant that for you.

towerniece, you should do some research about these posix acls

how do I modify one column to be auto_increment?

is it being used as a foreign key in another table?

threnody, I'm a n00b. indeed, I want an existing table to have one auto_increment id, can I add to it?

yes
well
it's possible to add it
I'm not sure if you can

back up using mysqldump first. set the entire column to null by using an update query. change the column to auto_increment using 'alter table'. populate the column by using a 'update table set some_other_column = some_other_column;' If it doesn't work out, reinstall your backup.
though after scrolling back, I see that you've conflated changing a column and adding a column. So I'm guessing you might have some problem.

threnody, can I use alter table to add one auto_increment id column? I have deleted the old id column
threnody, there's no data yet, so I can detelet everything

here you go, good luck: http://dev.mysql.com/doc/en/ALTER_TABLE.html

in a mysqldump, are the commented parts e.g. /*!40000 ALTER TABLE `Dish` ENABLE KEYS */; relevant to anything?

yes
they enable keys

so they are read, they aren't ignored? why are they commented out?

so they are created
mysqldump for myisam tables delays creating indexes until the rows are written
it's faster for it to read the completed table, sort stuff in memory, and write the keys out in big blocks than it is to write keys out as they are being created

Incorrect table definition; there can be only one auto column and it must be defined as a key

thank you for the explanation - i'll have to amend this dump that i have just been editing :P

dli__ did you define your auto increment as a key?


Related Topic:

Hi Im a bit stuck- I want to give a bunch of restrictions to an id in one table there are multiple restrictions
Hi Im a bit stuck- I want to give a bunch of restrictions to an id in one table there are multiple restrictions