I am trying to insert data into Temporary table with the help of Select Statement
The query is:
insert into tempProductCategory1
select * from ProductCategory ;
Problem is that this query running fine but takes so much time. When I check the execution status with the help of show process-list...
So that question has a bit of a tortured history, and 2 reopen votes right now. The OP has improved his question to the point where I don't believe people would vote to close it. Is that enough for a reopen?
@PaulWhite He'll still need to edit his post with the code for the other 2 functions that are in the query, plus provide explains for the queries in them. A question that looked incredibly simple is actually very complicated. A view with a select containing functions, does not a simple CTAS make
I am trying to solve this logic problem but my current MySQL schema is giving me a very poor performance with a large dataset. I have a table which contains almost half a billion telephone records. They are called the Do Not Call list or simply the DNC. When I start my campaign to dial numbers, I...
@ypercubeᵀᴹ I just checked the SQL 92 (in a German version), it allows every separator, including the newline character (or characters, I guess). Rather inconclusively, the only example actually uses newlines.
> In a <character string literal>, <national character string literal>, <Unicode character string literal>, or <binary string literal>, a <separator> shall contain a <newline>.
(that's from 2011 version but the 92 has something similar, too)
> 4) In a <character string literal>, <national character string literal>, <bit string literal>, or <hex string literal>, a <sep- arator> shall contain a <newline>.
I cannot find a pointer in this book to that, which might be my problem with matching the German text with English or that of the book with missing this point
but all this, in conjunction with ietf.org/rfc/rfc2119.txt, means that PostgreSQL is standard conforming while MySQL not?
I have a table that has customers and its joint customers. e.g Customer 1 has a joint customer 2. Customer 1 is also a joint customer to Customer 3.
I am trying to group all customers that are linked and assign same GroupCustNo to them. In below table 1-2 are linked, 3-1 are linked. So 2-3 are a...
@AndriyM Well you see, it's funny because Microsoft are quite famous for changing the names (and service guids) of their cloud offerings on a startlingly frequent basis. Not just Azure SQL DB - or whatever it is called today - but a huge number of the ever-expanding list of Azure services and offerings.
So the joke is, basically, that Microsoft change their cloud services names very frequently, so if you don't like one, you won't have to wait very long until it changes to something else you might like more, less, or about the same.
Obviously the 'joke' works better if they change it to better names on average, and if you see the humour in my exaggerating the frequency with which those name changes happen.
The names don't literally change every 15 minutes of course, so it's quite possible to pick holes in the joke's literal accuracy, but therein lies some of the intended humourous effect.
Just noticed something potentially interesting. SELECT ROUND(CAST(9.83570191 AS float),8) returns a slightly different value under compatibility level 120 versus 130. It can display identical results depending on the client's truncation/rounding rules of course.
Hopefully the company I work for isn't making any decisions based on whether the volatility of a stock is 0x4023ABE11EE94F3A instead of 0x4023ABE11EE94F39.
If they are, I guess they shouldn't be using floats.
Global pages
Site list
/topbar/site-switcher/site-list, e.g. http://stackoverflow.com/topbar/site-switcher/site-list
can be accessed from any site, with identical contents
HTML format
Hot questions for mobile
http://stackexchange.com/hot-questions-for-mobile
JSON format (need to parse it m...
Hmm, sorry I retracted the close vote, I had a mysql answer also but that didn't have an accepted answer. Not sure where I went wrong but I obviously did — Tom V45 mins ago
@TomV what was the question you had linked to? I found one anyway for MySQL and closed it.
I need to add a constraint with two columns that says if any given value is present in one of the columns, then:
1) It cannot be duplicated in the same column.
2) It cannot be duplicated in the other column either.
The constraint we are looking to make is with PrimaryEmail & SecondaryEma...
I want to implement class either-or table inheritance (Account, CatAccountDetails, DogAccountDetails) in SQL Server.
I found a recommendation for MySQL here (How do I map an IS-A relationship into a database?). Basically, it is:
use identical primary keys between the parent table (Account) and...
@jcolebrand I don't know if "brass tax" was a pun for "brass tacks" or a typo in your blogging meta post. I was going to edit the post but stopped because I realized you might be going for a pun.
@jcolebrand I haven't checked in detail related to this question but I can't seem to find anything dta.exe in there even though I know about the repository, good suggestion anyway
@jcolebrand Once I knew you were going for the pun it made sense. Originally I thought you were just trying to call back to the idiom and you honestly didn't know it was really tacks.
I have my business-logic in ~7000 lines of T-SQL stored procedures, and most of them has next JOIN syntax:
SELECT A.A, B.B, C.C
FROM aaa AS A, bbb AS B, ccc AS C
WHERE
A.B = B.ID
AND B.C = C.ID
AND C.ID = @param
Will I get performance growth if I will replace such query with this:
SELECT ...
A SQL join clause combines columns from one or more tables in a relational database. It creates a set that can be saved as a table or used as it is. A JOIN is a means for combining columns from one (self-table) or more tables by using values common to each. ANSI-standard SQL specifies five types of JOIN: INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER and CROSS. As a special case, a table (base table, view, or joined table) can JOIN to itself in a self-join.
A programmer declares a JOIN statement to identify rows for joining. If the evaluated predicate is true, the combined row is then produced in the...
@JzInqXc9Dg yes, AFAIK it's referred to as old style, I seem to recall it had an asterisk or + or something to define an outer join in most of the rdbms, not !=
@dezso Low quality review sucks, I had to open the question in a new tab to downvote the answer and then click "looks ok" or "skip" since there is no downvote button in that review queue
Just to clarify, but looks important for future readers: That means that you don't want to implement (and don't want to allow others to implement) relational databases onto the relevant MySQL installation, right? — MDCCL2 mins ago
@AndriyM If he clarifies by responding to the comments stating confusion and it's reopened would that reapprove the migration or is the decision final? I didn't think of that
the edit by @dezso makes it clear but I'm not sure it's the OP's intended question
I was about to suggest the answerer edit it themselves, but I guess it's fine, they've provided one of the key points (removing the super privilege) anyway.
@dezso I was confused by what I interpreted as inconsistencies betweeen the title and the body content. Fortunately, the situation is clear now, the OP wants to enforce FK definitions and the situation was funny :D