Skip to content

Tag: database

Update table to make primary key out of two foreign keys

Have a table sample_tag which already exists with 1000’s of entries. It consists of two foreign keys, sample_id and tag_id. However, the database is allowing duplicate sample_id/tag_id records to be created. Without creating a new table, is there a SQL statement to update the sample_tag table such that …

What do you call the . syntax in SQL?

In many databases, when writing a SELECT query, you can provide the database name along with the table name in order to resolve any ambiguity the database might encounter in case there are multiple databases with the same table names. For example, let’s say the user currently logged into SQL Server has …

Microsoft Azure database admin user creation

I deployed azure MySQL 5.7 database in azure. I can’t create another admin user with admin permission with the serveradmin login. When I tried below command GRANT ALL PRIVILEGES ON . TO ‘sammy’@’localhost’ WITH GRANT OPTION; I am getting error serveradmin@ip don’t have enou…