Too Tired to Work Smart
Today we have a guest editorial from Andy Warren as Steve Jones is on vacation. Today Andy looks at the ways we can cope when we have been working too much.
Today we have a guest editorial from Andy Warren as Steve Jones is on vacation. Today Andy looks at the ways we can cope when we have been working too much.
Several methods on how to pass an array of values from a client to SQL Server, and performance data about the methods.
I’ve long been a huge advocate for always referencing objects with a schema prefix in SQL Server.
In spite of what may be a controversial title to many of my regular blog readers, I don’t really want you to stop that practice in most of your T-SQL code, because the schema prefix is important and useful most of the time. At Stack Overflow, though, there is a very specific pattern we use where not specifying the schema is beneficial.
I recently changed jobs and my commute time doubled, I found myself with more time to think and I started asking questions.
In SQL and relational databases, NULL values are an important part of managing data and information stored in SQL tables. A NULL value is used as a placeholder for missing values or values that are unknown in a database column or cell.
A year ago, I started a monthly blogging event for the PostgreSQL community, inspired by T-SQL Tuesdays. I decided to call it PGSQL Phriday. (Time will tell if my insistence on trying to use a literation was a good idea or not.) Like the event for the SQL Server community, we ask someone to be […]
You will learn how a blockchain works and then use a SQL database to analyze data from a series of transactions.
Steve asks about your team at work today. What you like, what you need, even what you want to see in those with whom you work.
Credit card fraud detection is an important application of machine learning techniques, including Decision Trees. The goal is to identify and detect fraudulent transactions and separate them from valid transactions to prevent financial loss and protect user accounts.
Learn how you can interact with ChatGPT from PowerShell.
By Arun Sirpal
Not every production incident is a database in RECOVERY_PENDING or a corrupted event (like...
It is Friday, the queries are running, and nobody is watching the bill. That...
By Steve Jones
Annabel retired from Redgate Software this week. Across most of my career at Redgate,...
Comments posted to this topic are about the item Extreme DAX: Take your Power...
Comments posted to this topic are about the item What is the Cloud?
Comments posted to this topic are about the item Changing the Schema
I set up a few users on my SQL Server 2022 instance.
CREATE LOGIN User1 WITH PASSWORD = 'Demo12#1' CREATE USER User1 FOR LOGIN User1 GO CREATE LOGIN User2 WITH PASSWORD = 'Demo12#2' CREATE USER User2 FOR LOGIN User2 GO CREATE LOGIN User3 WITH PASSWORD = 'Demo12#3' CREATE USER User3 FOR LOGIN User3 GOI then created a schema that one of them owned. Under this schema, I added a table with some data.
CREATE SCHEMA MySchema AUTHORIZATION User1
GO
CREATE TABLE Myschema.MyTable(myid INT)
GO
INSERT MySchema.MyTable
(
myid
)
VALUES
(1), (2), (3)
GO
SELECT * FROM MySchema.MyTable
GO
I granted rights and verified that User2 could access this table.
GRANT SELECT ON Myschema.MyTable TO User2 GO SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOThis worked. Now, I move this schema to a new user.
ALTER AUTHORIZATION ON SCHEMA::Myschema TO User3; GOWhat happens with this code?
SETUSER 'USER2' GO SELECT * FROM MySchema.MyTable GOSee possible answers