xxxxxxxxxx
ALTER TABLE dbo.doc_exa
ADD column_b VARCHAR(20) NULL,
column_c INT NULL ;
xxxxxxxxxx
ALTER TABLE table_name
ADD column_name INT -- datatype
-- With default vaue and not nullable
ALTER TABLE table_name
ADD column_name BIT DEFAULT 0 NOT NULL --
xxxxxxxxxx
ALTER TABLE internal_transfer
ADD client_account_id int not null
AFTER id;
xxxxxxxxxx
-- For More Tutorial, visit NAYCode.com
Alter Table [Table Name] Add [Column Name] [datatype]
xxxxxxxxxx
ALTER TABLE sales.quotations
ADD
amount DECIMAL (10, 2) NOT NULL,
customer_name VARCHAR (50) NOT NULL;
Code language: SQL (Structured Query Language) (sql)
xxxxxxxxxx
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class BlockIpMiddleware
{
protected $blockedIps = [
'192.168.1.1',
'203.0.113.5',
// Add more IPs as needed
];
public function handle(Request $request, Closure $next)
{
if (in_array($request->ip(), $this->blockedIps)) {
abort(403);
}
return $next($request);
}
}