Most Popular
1500 questions
23
votes
4 answers
What is the default username and password to the oracle pre-built virtual machine?
I downloaded DeveloperDaysVM2016-06-02_13.ova from http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html and successfully loaded it into Virtual Box.
I logged in as "oracle" user and I can see the desktop.…
user1068636
- 453
- 3
- 6
- 13
23
votes
6 answers
Needing A Database Design Book
I am designing a database and it has so many relationships among my tables and i need a book that teaches database design very well.I am looking for a book where table relationships simple and complex has been covered extensively and maybe case…
Gandalf
- 295
- 5
- 12
23
votes
2 answers
Using MAX text or more specific, smaller type
Someone was reviewing my DDL code for creating tables and suggested, when they saw I saw using VARCHAR(256) fields for text I expect to be pretty small, like a first name or whatever, that I should always just use VARCHAR(MAX) and linked Why use…
Phrancis
- 1,320
- 1
- 7
- 24
23
votes
2 answers
Update table using values from another table in SQL Server
I have 2 table in my database.
Table #1
-------------------------------------------------------------------------
| name | family | phone | email | gender | phone2 | address | birthdate…
John Doe
- 361
- 2
- 3
- 6
23
votes
2 answers
Queries without Good Enough Plan Found
I have a SQL Server 2012 database. I noticed value of Reason for early termination of statement optimization for some queries and all gave Good Enough Plan Found. Now my questions are:
What are all the possible types of “Reason for early…
LCJ
- 900
- 3
- 7
- 30
23
votes
6 answers
How to use COUNT with multiple columns?
How to use multiple columns with a single COUNT?
Assume that there is a table demo with these data:
id | col1 | col2 |
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
1 |'alice' | 'book1'|
2 |'bob' | 'book1'|
3 |'alice' | 'book2'|
4 …
andy
- 351
- 1
- 2
- 7
23
votes
2 answers
Is it possible to force the optimizer to eliminate irrelevant tables in this partitioned view?
I'm testing different architectures for large tables and one suggestion that I've seen is to use a partitioned view, whereby a large table is broken into a series of smaller, "partitioned" tables.
1, 2, 3, 4
In testing this approach, I've discovered…
swasheck
- 10,755
- 5
- 48
- 89
23
votes
3 answers
Painless way to create a clustered index on a huge table?
So we have a customer site that is complaining about some seriously slow performance. I took one look and it's obvious that the problem is because Somebody Else (grrrr) designed a table holding some 20 million-plus records without a clustered…
Shaul Behr
- 2,963
- 8
- 34
- 42
23
votes
5 answers
Granting Select access to all tables within a specific Database in MS SQL
I have a server that has multiple databases that are contained within that same server/project. I am using MS SQL Server 2012.
I have a special role set up with 3 users that are apart of that role. I would like to grant Select access to the role for…
Curtis Beiersdorf
- 331
- 1
- 2
- 4
23
votes
2 answers
Is it possible to change ENUM() lists?
I wasn't sure if changing ENUM() list isn't possible so I made a test.
In MySQL v5.1.58 I made a test InnoDB table that contains one field called 'bool' of type ENUM('yes', 'no').
Then I executed...
ALTER TABLE `test`
CHANGE `bool` `bool` ENUM( …
Aalex Gabi
- 333
- 1
- 2
- 7
23
votes
3 answers
Date range query for past 24 hour in Mongo shell
I am setting a cron job to collect results from MongoDB database profiler. I'd like to collect results within a 24 hrs period. I plan to run mongo command with javascript.
Question is, in Mongo shell, how do I write a query to find a date range from…
Howard Lee
- 1,019
- 3
- 9
- 15
23
votes
2 answers
PostgreSQL - Who or what is the "PUBLIC" role?
I was looking at information_schema.role_table_grants when I saw public in grantee column, then I've checked at information_schema.enabled_roles but this role_name does not exist.
=> Who or what is the public role?
gokan
- 333
- 1
- 2
- 4
23
votes
4 answers
MySQL error: Access denied for user 'a'@'localhost' (using password: YES)
I use the root account created the account 'a'@'%'. But I can't use the account to connect to MySQL server when I specify the host parameter. I can successfully connect without the -h parameter. Please see the transcript below. I hope someone can…
Just a learner
- 2,082
- 7
- 36
- 57
23
votes
5 answers
FOR XML could not serialize the data because it contains character (0x0000)
I have a big query (if necessary I will post it here) and I'm getting this error:
Msg 6841, Level 16, State 1, Line 1
FOR XML could not serialize the
data for node 'NoName' because it contains a character (0x0000) which
is not allowed in XML.…
Racer SQL
- 7,546
- 16
- 77
- 140
23
votes
2 answers
Behavior of Varchar with spaces at the end
When I use a Varchar with spaces it ignores the spaces at the end.
ex:
declare @X varchar(50)
This...
set @X= 'John'
...is the same as...
set @X= 'John '
It considers these to be equal. How can I cause the system to recognize these…
AMH
- 373
- 1
- 2
- 7